コード例 #1
0
ファイル: ModuleObject.php プロジェクト: uzerpllp/uzerp
 function getComponentLocations()
 {
     $components = new ModuleComponent();
     $components->idField = 'name';
     $components->identifierField = 'location';
     $cc = new ConstraintChain();
     $cc->add(new Constraint('module_id', '=', $this->id));
     $cc->add(new Constraint('type', 'in', "('C', 'E', 'M', 'R')"));
     return $components->getAll($cc);
 }
コード例 #2
0
 public function get_controller_list($module_id = '')
 {
     if (is_ajax() && is_direct_request()) {
         $module_id = $this->_data['module_id'];
     }
     $module_components = new ModuleComponent();
     $cc = new ConstraintChain();
     $cc->add(new Constraint('module_id', '=', $module_id));
     $cc->add(new Constraint('type', '=', 'C'));
     $controllers = $module_components->getAll($cc);
     if (is_ajax() && is_direct_request()) {
         $output['controller'] = array('data' => $controllers, 'is_array' => is_array($controllers));
         $this->view->set('data', $output);
         $this->setTemplateName('ajax_multiple');
     } else {
         return $controllers;
     }
 }