コード例 #1
0
 public function loadDefaultDecorators()
 {
     parent::loadDefaultDecorators();
     $this->setDecorators(array('FormElements', 'Fieldset', 'Form'))->setDisplayGroupDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->setAttrib('id', 'form-' . $this->getName());
     $this->getDecorator('Fieldset')->setOption('id', 'fieldset-' . $this->getName());
     $this->setElementsBelongTo($this->getName());
 }
コード例 #2
0
ファイル: FormAbstract.php プロジェクト: laiello/wanderson
 public function addSubForm(Zend_Form $form, $name, $order = null)
 {
     $form->loadDefaultDecorators();
     $form->removeDecorator('Form');
     $form->addDecorator('Fieldset')->addDecorator('DtDdWrapper');
     $form->setElementsBelongTo($name);
     return parent::addSubForm($form, $name, $order);
 }
コード例 #3
0
ファイル: Form.php プロジェクト: getJv/ModuleTeste
 /**
  * Carrega o Load default decorators normal e realiza as adaptações para o padrão do bootStrap
  * @link http://getbootstrap.com/css/#forms sugestão de uso do bootstrap
  * @author Jhonatan Morais <*****@*****.**>
  * @return Zend_Form_Element
  */
 public function loadDefaultDecorators()
 {
     parent::loadDefaultDecorators();
     $decorators = $this->getDecorators();
     if (!empty($decorators)) {
         $this->removeDecorator('HtmlTag');
     }
     return $this;
 }
コード例 #4
0
ファイル: FormTest.php プロジェクト: rafalwrzeszcz/zf2
 /**
  * Prove the fluent interface on Zend_Form::loadDefaultDecorators
  *
  * @group ZF-9913
  * @return void
  */
 public function testFluentInterfaceOnLoadDefaultDecorators()
 {
     $this->assertSame($this->form, $this->form->loadDefaultDecorators());
 }
コード例 #5
0
ファイル: Wrapper.php プロジェクト: alexukua/opus4
 public function loadDefaultDecorators()
 {
     parent::loadDefaultDecorators();
     $this->setDecorators(array('FormElements', 'Form', array('HtmlTag', array('tag' => 'div', 'class' => 'metadata-form'))));
 }