/**
  * Initialisation du formulaire
  *
  * @access private
  * @return void
  *
  * @author (c) Etienne de Longeaux <*****@*****.**>
  * @since 2012-06-26
  */
 private function setDecorators()
 {
     if (isset(self::$_content['formDecorator']) && !empty(self::$_content['formDecorator'])) {
         $this->_form->setDecorators(array(array('ViewScript', array('viewScript' => 'Form/' . self::$_content['formDecorator']))));
     } else {
         $this->_form->setDecorators(array(array('ViewScript', array('viewScript' => 'Form/' . $this->_form_template))));
     }
 }
Example #2
0
 public function init()
 {
     // parent::_construct($option);
     $this->setMethod('post');
     $username = $this->CreateElement('text', 'username')->setLabel('User Name');
     $username = setDecorators(array('ViewHelper', 'Description', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $password = $this->createElement('text', 'password')->setLabel('Password');
     $password->setDecorators(array('ViewHelper', 'Description', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $submit = $this->createElement('submit', 'submit')->setLabel('Login');
     $submit->setDecorators(array('Vievhelper', 'Description', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'colspan' => 2, 'align' => 'center')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $this->addElements(array($username, $password, $submit));
     $this->setDecorators(array('FormElements', array(array('data' => 'HtmlTag'), array('tag' => 'table')), 'Form'));
 }