function loadFormXmlAction() { $nameSpace = new Sys_Model_Namespace(); $nameSpaces = $nameSpace->fetchAll(); foreach ($nameSpaces as $nameSpacObj) { $nameSpac = strtolower($nameSpacObj->namespace); $config = App_Model_Config::loadXml($nameSpac); foreach ($config->classes as $name => $modelconfig) { $entity = new Sys_Model_Entity(); $entity = $entity->fetchRow("model_name='{$name}'"); $id = $entity->id; foreach ($modelconfig->prop as $prop) { $ln = new Sys_Model_Entity_Property(); $ln->modelId = $id; $ln->name = $prop->name; $ln->column = $prop->column; $ln->label = $prop->label; $ln->sqltype = $prop->sqltype; $ln->varType = $prop->varType; $ln->input = $prop->input; $ln->isRequired = $prop->required == 'true' ? 1 : 0; $ln->isPk = $prop->pk == 'true' ? 1 : 0; $ln->isAutoincrement = $prop->autoincrement == 'true' ? 1 : 0; $ln->style = $prop->style; $ln->isReadonly = $prop->readonly == 'true' ? 1 : 0; $ln->isEnabled = $prop->enabled == 'true' ? 1 : 0; $ln->cssClass = $prop->class; $ln->save(); } } } $this->_helper->redirector('index'); $this->render('blank', null, true); }
function loadFormXmlAction() { ini_set('max_execution_time', 0); $nameSpace = new Sys_Model_Namespace(); $nameSpaces = $nameSpace->fetchAll(); foreach ($nameSpaces as $nameSpacObj) { $nameSpac = strtolower($nameSpacObj->namespace); $config = App_Model_Config::loadXml($nameSpac); $ordering = 0; foreach ($config->classes as $name => $modelconfig) { $entity = new Sys_Model_Entity(); $entity = $entity->fetchRow("model_name='{$name}'"); $id = trim($entity->id); if ($id != '') { $ln = new Sys_Model_Form(); $datagridid = $ln->formName = $name . "_Form_Default"; $ln->cssClass = 'form'; $ln->renderer = 'default'; $ln->modelId = $id; $ln->fometype = 'default'; $ln->description = ''; $ln->save(); foreach ($modelconfig->prop as $prop) { $gp = new Sys_model_Form_Field(); $gp->fieldid = $datagridid . "_" . $prop->name; $gp->fieldName = $prop->name; $gp->formId = $datagridid; $gp->fieldName = $prop->name; $gp->label = $prop->name; $gp->vartype = ''; $gp->inputtype = ''; $gp->cssClass = ''; $gp->required = 0; $gp->multiOptions = ''; $gp->refModel = ''; $gp->refFkField = ''; $gp->refLabelField = ''; $gp->suffix = ''; $gp->description = ''; $gp->ordering = ++$ordering; $gp->save(); } } } } $this->_helper->redirector('index'); $this->render('blank', null, true); }
function loadFromModelAction() { $config = App_Model_Config::loadXml('sdc'); //print_r($modelconfig); foreach ($config->classes as $modelconfig) { foreach ($modelconfig->prop as $prop) { $key = $prop->name; $value = $prop->label; $ln = new Sys_Model_Translation(); $ln->setKey($key); $ln->setEn($value); $ln->save(); } } $this->render('blank', null, true); }
function loadFromModelAction() { $config = App_Model_Config::loadXml('eau'); //$package = arrar(); foreach ($config->classes as $modelconfig) { foreach ($modelconfig->prop as $prop) { $key = $prop->name; $value = $prop->label; $ln = new Sys_Model_Translation(); $ln->setKey($key); $ln->setEn($value); $ln->save(); } } $this->_helper->redirector('index'); $this->render('blank', null, true); }
function loadFormXmlAction() { ini_set('max_execution_time', 0); $nameSpace = new Sys_Model_Namespace(); $nameSpaces = $nameSpace->fetchAll(); foreach ($nameSpaces as $nameSpacObj) { $nameSpac = strtolower($nameSpacObj->namespace); $config = App_Model_Config::loadXml($nameSpac); $ordering = 0; foreach ($config->classes as $name => $modelconfig) { $entity = new Sys_Model_Entity(); $entity = $entity->fetchRow("model_name='{$name}'"); $id = trim($entity->id); if ($id != '') { $ln = new Sys_Model_Datagrid(); $ln->modelId = $id; $datagridid = $ln->gridname = $name . "_Grid_Default"; $ln->cssClass = 'default'; $ln->width = '100%'; $ln->renderer = 'Table'; $ln->sperate = ''; $ln->sql = ''; $ln->save(); foreach ($modelconfig->prop as $prop) { //echo $prop->name; $gp = new Sys_Model_Datagrid_Fields(); $gp->id = $datagridid . "_" . $prop->name; $gp->datagridId = $datagridid; $gp->fieldName = $prop->name; $gp->show = '1'; $gp->ref = ''; $gp->width = ''; $gp->class = 'col'; $gp->align = 'left'; $gp->ordering = ++$ordering; $gp->save(); } } } } // $this->_helper->redirector('index'); $this->render('blank', null, true); }
function loadFormXmlAction() { $nameSpace = new Sys_Model_Namespace(); $nameSpaces = $nameSpace->fetchAll(); foreach ($nameSpaces as $nameSpacObj) { $nameSpac = strtolower($nameSpacObj->namespace); $config = App_Model_Config::loadXml($nameSpac); //$package = arrar(); foreach ($config->classes as $name => $modelconfig) { // foreach ($modelconfig->prop as $prop) { $key = $prop->name; $value = $prop->label; $ln = new Sys_Model_Entity(); $ln->setNamespace($nameSpac); $ln->setEntityName($name); $ln->save(); // } } } $this->_helper->redirector('index'); $this->render('blank', null, true); }