Skip to content

Commit

Permalink
Modules generator update
Browse files Browse the repository at this point in the history
  • Loading branch information
k-samuel committed Mar 27, 2016
1 parent f7f63a8 commit 2294c9b
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions dvelum/app/Modules/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function createVcModule($object , $projectFile)
$linkedObjects[] = $objectConfig->getLinkedObject($key);
}

if(in_array($item['db_type'] , Db_Object_Builder::$textTypes , true) && !$objectConfig->isLink($key))
if(in_array($item['db_type'] , Db_Object_Builder::$textTypes , true) || $objectConfig->isObjectLink($key) || $objectConfig->isMultiLink($key))
continue;

if(isset($item['hidden']) && $item['hidden'])
Expand Down Expand Up @@ -297,6 +297,14 @@ public function createVcModule($object , $projectFile)
break;
}

if($objectConfig->isDictionaryLink($fieldConfig->name)){
$dictionary = $objectConfig->getLinkedDictionary($fieldConfig->name);
$rendererHelper = new Ext_Helper_Grid_Column_Renderer();
$rendererHelper->setType(Ext_Helper_Grid_Column_Renderer::TYPE_DICTIONARY);
$rendererHelper->setValue($dictionary);
$column->renderer = $rendererHelper;
}

$dataGrid->addColumn($column->getName() , $column , $parent = 0);
}

Expand Down Expand Up @@ -479,7 +487,7 @@ public function createModule($object , $projectFile)
$linkedObjects[] = $objectConfig->getLinkedObject($key);
}

if(in_array($item['db_type'] , Db_Object_Builder::$textTypes , true) && !$objectConfig->isLink($key))
if(in_array($item['db_type'] , Db_Object_Builder::$textTypes , true) || $objectConfig->isObjectLink($key) || $objectConfig->isMultiLink($key))
continue;

if(isset($item['hidden']) && $item['hidden'])
Expand Down Expand Up @@ -651,6 +659,14 @@ public function createModule($object , $projectFile)
$column->setName($fieldConfig->name);
$column->itemId = $column->getName();

if($objectConfig->isDictionaryLink($fieldConfig->name)){
$dictionary = $objectConfig->getLinkedDictionary($fieldConfig->name);
$rendererHelper = new Ext_Helper_Grid_Column_Renderer();
$rendererHelper->setType(Ext_Helper_Grid_Column_Renderer::TYPE_DICTIONARY);
$rendererHelper->setValue($dictionary);
$column->renderer = $rendererHelper;
}

$dataGrid->addColumn($column->getName() , $column , $parent = 0);
}

Expand Down

0 comments on commit 2294c9b

Please sign in to comment.