Exemplo n.º 1
0
 public function getModifyForm()
 {
     $field_id = intval($_POST['field_id']);
     $control_id = intval($_POST['control_id']);
     $field = new Crud_Models_Field();
     $field->load($field_id);
     $field->loadValidators();
     $field->loadControl();
     $control = new Controls_Models_Control();
     $control->load($control_id);
     echo call_user_func(array(new $control->class(), 'modifyForm'), $field);
 }
Exemplo n.º 2
0
 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;
 }