예제 #1
0
 /**
  *
  * @param <type> $pModel = NULL
  * @return <type>
  */
 public function __construct($pModel = NULL)
 {
     if (is_null($pModel)) {
         $pModel = new Zupal_Modules();
     }
     parent::__construct(new Zend_Config_Ini(dirname(__FILE__) . DS . 'Form.ini', 'fields'));
     $this->set_domain($pModel);
 }
예제 #2
0
 public function __construct($pAction = NULL)
 {
     $ini_path = preg_replace('~php$~', 'ini', __FILE__);
     $config = new Zend_Config_Ini($ini_path, 'fields');
     parent::__construct($config);
     if ($pAction) {
         $this->setAction($pAction);
     }
 }
예제 #3
0
 public function __construct($pDomain)
 {
     $ini_path = preg_replace('~php$~', 'ini', __FILE__);
     $config = new Zend_Config_Ini($ini_path, 'fields');
     parent::__construct($config);
     if ($pDomain) {
         $this->set_domain($pDomain);
         $this->domain_to_form();
     }
 }
예제 #4
0
 public function __construct($pDomain)
 {
     $ini_path = preg_replace('~php$~', 'ini', __FILE__);
     $config = new Zend_Config_Ini($ini_path, 'fields');
     parent::__construct($config);
     if ($pDomain) {
         $this->set_domain($pDomain);
     }
     $domain_values = $this->get_domain()->toArray();
     $this->load_modules();
 }
예제 #5
0
 public function __construct($pDomain)
 {
     $ini_path = preg_replace('~php$~', 'ini', __FILE__);
     $config = new Zend_Config_Ini($ini_path, 'fields');
     parent::__construct($config);
     $this->_init_resources_menu();
     $this->_init_status_menu();
     if ($pDomain) {
         $this->set_domain($pDomain);
         $this->_atom_load();
     }
 }
예제 #6
0
 public function __construct(Zupal_Employee $pEmp = NULL)
 {
     $ini_path = dirname(__FILE__) . DS . 'Form.ini';
     $config = new Zend_Config_Ini($ini_path, 'fields');
     parent::__construct($config);
     if (!$pEmp) {
         $pEmp = new Zupal_Employees();
     }
     $this->set_domain($pEmp);
     $this->addDisplayGroup(array('employee_name_first', 'employee_name_last', 'employee_email', 'employee_gender'), 'employee', array('legend' => 'employee', 'order' => 1));
     $this->addDisplayGroup(array('position', 'salary', 'status'), 'Job', array('legend' => 'Position', 'order' => 2));
 }
예제 #7
0
 public function __construct(Zupal_People $pPeople = NULL)
 {
     $ini_path = dirname(__FILE__) . DS . 'Form.ini';
     $config = new Zend_Config_Ini($ini_path, 'fields');
     parent::__construct($config);
     $root = Zend_Controller_Front::getInstance()->getBaseUrl() . DS . 'people' . DS . 'item';
     if (is_null($pPeople)) {
         $pPeople = new Zupal_People();
     }
     $this->set_domain($pPeople);
     if ($pPeople->identity()) {
         $this->setAction($root . DS . 'updatevalidate');
     } else {
         $this->setAction($root . DS . 'addvalidate');
         $this->submit->setLabel('Create Person');
     }
     $this->setMethod('post');
 }
예제 #8
0
 public function __construct(Zupal_Node_Abstract $pContent = NULL, $pOptions = NULL)
 {
     parent::__construct($pOptions);
     $elements = array();
     foreach ($this->getElements() as $element) {
         $elements[] = $element->getName();
     }
     $this->set_domain($pContent);
     $this->removeDecorator('HtmlTag');
     $this->addDisplayGroup($elements, 'content', array('legend' => 'Content', 'seperator' => ''));
     $this->getDisplayGroup('content')->removeDecorator('DtDdWrapper');
     $this->addElement('multiCheckbox', 'status', array('label' => 'Status', 'separator' => ''));
     $this->status->setMultiOptions(Zupal_Nodes::$STATUS_PHRASES);
     $this->addDisplayGroup(array('status'), 'node', array('legend' => 'Node', 'order' => 10));
     $this->getDisplayGroup('node')->removeDecorator('DtDdWrapper');
     $this->addElement('submit', 'submit', array('label' => 'Submit'));
     $this->addDisplayGroup(array('submit'), 'buttons', array('order' => 12));
     $this->getDisplayGroup('buttons')->removeDecorator('DtDdWrapper');
     $this->setMethod('post');
 }
예제 #9
0
 public function __construct($pRole = NULL)
 {
     $ini_path = dirname(__FILE__) . DS . 'Form.ini';
     $config = new Zend_Config_Ini($ini_path, 'fields');
     parent::__construct($config);
     $root = Zend_Controller_Front::getInstance()->getBaseUrl() . DS . 'admin' . DS . 'acl' . DS;
     if (is_null($pRole)) {
         $pRole = new Zupal_Resources();
     } elseif (is_string($pRole)) {
         $pRole = new Zupal_Resources($pRole);
     }
     $this->set_domain($pRole);
     if ($pRole->identity()) {
         $this->setAction($root . 'resupdatevalidate');
     } else {
         $this->setAction($root . 'resaddvalidate');
         $this->submit->setLabel('Create Resource');
     }
     $this->setMethod('post');
 }