예제 #1
0
파일: field.php 프로젝트: vukasins/ocp
 public function loadValidators()
 {
     if ($this->ids_sys_validator == '') {
         return $this;
     }
     $ids_validator = explode(',', trim($this->ids_sys_validator));
     foreach ($ids_validator as $id_validator) {
         $validator = new Validators_Models_Validator();
         $validator->load($id_validator);
         $this->validators[] = $validator;
     }
     return $this;
 }
예제 #2
0
파일: objects.php 프로젝트: vukasins/ocp
 public function modifyForm($sys_object_id)
 {
     $sys_object = new Crud_Models_Object();
     $sys_object->load(intval($sys_object_id));
     $sys_object->loadFieldsForObject();
     // load controls
     $where = array();
     $order = array();
     $order[] = array('title', 'ASC');
     $control = new Controls_Models_Control();
     $controls = $control->search($where, $order);
     // load validators
     $where = array();
     $order = array();
     $order[] = array('title', 'ASC');
     $validator = new Validators_Models_Validator();
     $validators = $validator->search($where, $order);
     Libraries_View::getInstance()->sys_object = $sys_object;
     Libraries_View::getInstance()->controls = $controls;
     Libraries_View::getInstance()->validators = $validators;
     $content = Libraries_View::getInstance()->setModule('crud')->load('map/modify');
     echo $content;
 }