当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Form_Element_Select::addDecorators方法代码示例

本文整理汇总了PHP中Zend_Form_Element_Select::addDecorators方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Select::addDecorators方法的具体用法?PHP Zend_Form_Element_Select::addDecorators怎么用?PHP Zend_Form_Element_Select::addDecorators使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Form_Element_Select的用法示例。


在下文中一共展示了Zend_Form_Element_Select::addDecorators方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 public function init()
 {
     // cliente_id
     $cliente_id = new Zend_Form_Element_Select('cliente_id');
     $cliente_id->setLabel('Cliente: ');
     $cliente_id->setMultiOptions($this->getClientes());
     $cliente_id->addDecorators(Form_Decorators::$simpleElementDecorators);
     $cliente_id->setRequired();
     // senha_tipo_id
     $senha_tipo_id = new Zend_Form_Element_Select('senha_tipo_id');
     $senha_tipo_id->setLabel('Tipo Senha: ');
     $senha_tipo_id->setMultiOptions($this->getSenhasTipo());
     $senha_tipo_id->setRequired();
     $senha_tipo_id->addDecorators(Form_Decorators::$simpleElementDecorators);
     // senha_host
     $senha_host = new Zend_Form_Element_Text('senha_host');
     $senha_host->setLabel('Host: ');
     $senha_host->setRequired();
     $senha_host->addDecorators(Form_Decorators::$simpleElementDecorators);
     // senha_usuario
     $senha_usuario = new Zend_Form_Element_Text('senha_usuario');
     $senha_usuario->setLabel('Usuário: ');
     $senha_usuario->setRequired();
     $senha_usuario->addDecorators(Form_Decorators::$simpleElementDecorators);
     // senha_senha
     $senha_senha = new Zend_Form_Element_Text('senha_senha');
     $senha_senha->setLabel('Senha: ');
     $senha_senha->setRequired();
     $senha_senha->addDecorators(Form_Decorators::$simpleElementDecorators);
     // senha_observacao
     $senha_observacao = new Zend_Form_Element_Textarea('senha_observacao');
     $senha_observacao->setLabel('Observações: ');
     $senha_observacao->setAttrib('rows', 10);
     // submit
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setLabel('Cadastrar');
     $submit->setAttribs(array('id' => 'btn-nova-senha', 'class' => 'btn btn-sm btn-info form-control'));
     // add elements
     $this->addElements(array($cliente_id, $senha_tipo_id, $senha_host, $senha_usuario, $senha_senha, $senha_observacao, $submit));
     // set defaults form attribs
     $this->setDefaultAttribs();
 }
开发者ID:nandorodpires2,项目名称:k-sys,代码行数:42,代码来源:Add.php

示例2: _addSelect

 /**
  * Add a select (dropdown list) element to the form.
  *
  * @param array $question
  *
  * @return void
  */
 private function _addSelect($question)
 {
     $elemName = $question['FQT_TypeName'] . self::UNDERSCORE . $question['FQ_ElementID'];
     $element = new Zend_Form_Element_Select($elemName);
     $element->removeDecorator('DtDdWrapper');
     $element->addDecorators(array('ViewHelper', array('HtmlTag', array('tag' => 'div', 'class' => 'answer-zone'))));
     $element->setAttrib('class', 'stdSelect');
     $this->_addExtras($element, $question);
     $this->addElement($element);
     $this->_displayGroupElements[] = $elemName;
 }
开发者ID:anunay,项目名称:stentors,代码行数:18,代码来源:FormFront.php


注:本文中的Zend_Form_Element_Select::addDecorators方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。