Пример #1
0
 /**
  * 来自scaffold_config配置的脚手架
  */
 public function cAction()
 {
     $model_name = $this->getRequest()->getParam('model');
     $config_info = models_scaffoldConfig::getInstance()->getConfigByModelName($model_name);
     if ($config_info == FALSE) {
         $errorMsg = '该脚手架不存在,请检查配置或数据是否正常.';
         $this->set('errorMSG', $errorMsg);
     } else {
         $this->table_name = $config_info['table_name'];
         $this->primary = $config_info['table_primary'];
         $this->columns = explode(',', $config_info['columns']);
         $this->Scaffold = TRUE;
         $this->ScaffoldRoute();
     }
 }
Пример #2
0
 /**
  * 获取并设置所有scaffold config
  * leftMenu
  */
 protected function setScaffoldConfig()
 {
     $this->set('scaffold_configs', models_scaffoldConfig::getInstance()->getAllConfig());
 }