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


PHP Zend_Form_Element_Hidden::setDescription方法代码示例

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


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

示例1: createToolbar

 /**
  * Cria a toolbar.
  * @param Boolean $save define se irá aparecer o botão padrão Salvar.
  * @param Boolean $saveClose Botão para salvar e fechar
  * @param Boolean $printForm Botão para imprimir
  * @param Boolean $deleteForm Botão para deletar
  * @param Boolean $clearForm Botão limpar dados de um formulário
  * @param Boolean $includeForm Botão para incluir
  * @param Boolean $editForm Botão para editar
  * @param Boolean $backForm Botão para voltar
  * @param Boolean $execute Botão para executar processo [GAMBI]
  * @param Boolean $returnPendency Botão para processar dados [GAMBI]
  * @param Boolean $processData Botão para processar dados [GAMBI]
  * @param Boolean $block Botão para bloquear recursos [GAMBI]
  * @param Boolean $disable Botão para desativar recursos [GAMBI]
  */
 public function createToolbar($save = false, $saveClose = false, $printForm = false, $deleteForm = false, $clearForm = false, $includeForm = false, $editForm = false, $backForm = false, $execute = false, $returnPendency = false, $processData = false, $block = false, $disable = false, array $params = null)
 {
     $elementsList = array();
     $elementsNameList = array();
     if ($save) {
         $saveForm = new Zend_Form_Element_Submit('saveForm');
         $saveForm->setLabel('Salvar');
         $saveForm->setAttrib('class', 'save');
         $saveForm->setDecorators(array(array('ViewHelper'), array('description'), array('HtmlTag', array('tag' => 'li'))));
         $elementsList[] = $saveForm;
         $elementsNameList[] = "saveForm";
     }
     if ($saveClose) {
         $saveCloseForm = new Zend_Form_Element_Submit('saveCloseForm');
         // $saveCloseForm = new Zend_Form_Element_Hidden('saveCloseForm');
         $saveCloseForm->setLabel('Salvar/Fechar');
         $saveCloseForm->setAttrib('class', 'save_close');
         // $saveCloseForm->setDescription('<a href="" class="save_close" id="save_close">Salvar/Fechar</a>');
         $saveCloseForm->setDecorators(array(array('ViewHelper'), array('description'), array('HtmlTag', array('tag' => 'li'))));
         $saveCloseForm->getDecorator('description')->setOption('escape', false);
         $elementsList[] = $saveCloseForm;
         $elementsNameList[] = "saveCloseForm";
     }
     if ($execute) {
         $execute = new Zend_Form_Element_Hidden('execute');
         $execute->setDescription('<a href="" id="execute" class="execute">Executar</a>');
         $execute->setDecorators(array(array('description'), array('HtmlTag', array('tag' => 'li', 'class' => 'execute'))));
         $execute->getDecorator('description')->setOption('escape', false);
         $elementsList[] = $execute;
         $elementsNameList[] = "execute";
     }
     if ($returnPendency) {
         $returnPendency = new Zend_Form_Element_Hidden('returnPendency');
         $returnPendency->setDescription('<a href="" id="rtPendency" class="back">Retornar pendência</a>');
         $returnPendency->setDecorators(array(array('description'), array('HtmlTag', array('tag' => 'li', 'class' => 'back'))));
         $returnPendency->getDecorator('description')->setOption('escape', false);
         $elementsList[] = $returnPendency;
         $elementsNameList[] = "returnPendency";
     }
     if ($processData) {
         $processData = new Zend_Form_Element_Hidden('processData');
         $processData->setDescription('<a href="" id="processData" class="process">Dados do processo</a>');
         $processData->setDecorators(array(array('description'), array('HtmlTag', array('tag' => 'li', 'class' => 'process'))));
         $processData->getDecorator('description')->setOption('escape', false);
         $elementsList[] = $processData;
         $elementsNameList[] = "processData";
     }
     if ($clearForm) {
         $clearForm = new Zend_Form_Element_Hidden('clearForm');
         $clearForm->setDescription('<a href="" id="clear_btn" class="clean">Limpar</a>');
         $clearForm->setDecorators(array(array('description'), array('HtmlTag', array('tag' => 'li', 'class' => 'clear'))));
         $clearForm->getDecorator('description')->setOption('escape', false);
         $elementsList[] = $clearForm;
         $elementsNameList[] = "clearForm";
     }
     if ($includeForm) {
         $includeForm = new Zend_Form_Element_Hidden('includeForm');
         $includeForm->setDescription('<a href="#" id="include_btn" class="include">Incluir</a>');
         $includeForm->setDecorators(array(array('ViewHelper'), array('description'), array('HtmlTag', array('tag' => 'li', 'class' => 'include'))));
         $includeForm->getDecorator('description')->setOption('escape', false);
         $elementsList[] = $includeForm;
         $elementsNameList[] = "includeForm";
     }
     if ($editForm) {
         $editForm = new Zend_Form_Element_Hidden('editForm');
         $editForm->setDescription('<a href="#" id="edit_btn" class="edit">Editar</a>');
         $editForm->setDecorators(array(array('ViewHelper'), array('description'), array('HtmlTag', array('tag' => 'li', 'class' => 'edit'))));
         $editForm->getDecorator('description')->setOption('escape', false);
         $elementsList[] = $editForm;
         $elementsNameList[] = "editForm";
     }
     if ($deleteForm) {
         $deleteForm = new Zend_Form_Element_Hidden('deleteForm');
         $deleteForm->setDescription('<a href="" id="delete_btn" class="delete">Excluir</a>');
         $deleteForm->setDecorators(array(array('description'), array('HtmlTag', array('tag' => 'li', 'class' => 'delete'))));
         $deleteForm->getDecorator('description')->setOption('escape', false);
         $elementsList[] = $deleteForm;
         $elementsNameList[] = "deleteForm";
     }
     if ($block) {
         $block = new Zend_Form_Element_Hidden('blockForm');
         $block->setDescription('<a href="" id="block_btn" class="block">Bloquear/Desbloquear</a>');
         $block->setDecorators(array(array('description'), array('HtmlTag', array('tag' => 'li', 'class' => 'block'))));
         $block->getDecorator('description')->setOption('escape', false);
//.........这里部分代码省略.........
开发者ID:robertsonmello,项目名称:projetos,代码行数:101,代码来源:IgsForm.php

示例2: __construct


//.........这里部分代码省略.........
     $subject->setDecorators(array('ViewHelper', array(array('control' => 'HtmlTag'), array('tag' => 'div', 'class' => 'element-control')), array('Label', array('class' => 'control-label')), array(array('controls' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'))));
     $subject->addValidator('stringLength', false, array(1, 100, "messages" => "Chuyên ngành dài tối đa 100 ký tự"));
     $this->addElement($subject);
     $experienceYears = new Zend_Form_Element_Select('ExperienceYears');
     $experienceYears->setLabel('Số Năm Kinh Nghiệm *');
     $experienceYears->addFilter('StringTrim');
     $experienceYears->setRequired(false);
     $experienceYears->setDecorators(array('ViewHelper', array(array('control' => 'HtmlTag'), array('tag' => 'div', 'class' => 'element-control')), array('Label', array('class' => 'control-label')), array(array('controls' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'))));
     $options = unserialize(EXPERIENCE_YEAR);
     //$experienceYears->addMultiOptions(array_combine($options, $options));
     $experienceYears->setMultiOptions(unserialize(EXPERIENCE_YEAR));
     $this->addElement($experienceYears);
     $career = new Zend_Form_Element_Select('Career');
     $career->setLabel('Hiện tại là *');
     $career->addFilter('StringTrim');
     $career->addValidator('Int');
     $career->setRequired(true);
     $career->setDecorators(array('ViewHelper', array(array('control' => 'HtmlTag'), array('tag' => 'div', 'class' => 'element-control')), array('Label', array('class' => 'control-label')), array(array('controls' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'))));
     $career->setMultiOptions(unserialize(TUTOR_CAREERS));
     $this->addElement($career);
     $careerLocation = new Zend_Form_Element_Text('CareerLocation');
     $careerLocation->setLabel('Nơi Công Tác ( Giáo hoặc Giảng Viên ) *');
     $careerLocation->addFilter('StringTrim');
     $careerLocation->setRequired(false);
     $careerLocation->setAttrib('style', 'min-height: 30px;');
     $careerLocation->setDecorators(array('ViewHelper', array(array('control' => 'HtmlTag'), array('tag' => 'div', 'class' => 'element-control')), array('Label', array('class' => 'control-label')), array(array('controls' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'))));
     $careerLocation->addValidator('stringLength', false, array(1, 100, "messages" => "Nơi Công Tác dài tối đa 100 ký tự"));
     $this->addElement($careerLocation);
     $teachableInClass = new Zend_Form_Element_Text('TeachableInClass');
     $teachableInClass->setLabel('Lớp Có Thể Dạy');
     $teachableInClass->addFilter('StringTrim');
     $teachableInClass->setRequired(false);
     $teachableInClass->setAttrib('disabled', true);
     $teachableInClass->setDescription('<a id="grades-modal" class="btn btn-info" title="Chọn lớp">...</a>');
     $teachableInClass->setDecorators(array('ViewHelper', array('Description', array('escape' => false)), array(array('control' => 'HtmlTag'), array('tag' => 'div', 'class' => 'element-control col-lg-6')), array('Label', array('class' => 'control-label col-lg-2')), array(array('controls' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'))));
     $this->addElement($teachableInClass);
     $teachableSubjects = new Zend_Form_Element_Text('TeachableSubjects');
     $teachableSubjects->setLabel('Môn Có Thể Dạy');
     $teachableSubjects->addFilter('StringTrim');
     $teachableSubjects->setRequired(false);
     $teachableSubjects->setAttrib('disabled', true);
     $teachableSubjects->setDescription('<a id="subjects-modal" class="btn btn-info" title="Chọn môn">...</a>');
     $teachableSubjects->setDecorators(array('ViewHelper', array('Description', array('escape' => false)), array(array('control' => 'HtmlTag'), array('tag' => 'div', 'class' => 'element-control col-lg-6')), array('Label', array('class' => 'control-label col-lg-2')), array(array('controls' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'))));
     $this->addElement($teachableSubjects);
     $teachableDistricts = new Zend_Form_Element_Text('TeachableDistricts');
     $teachableDistricts->setLabel('Khu Vực Có Thể Dạy');
     $teachableDistricts->addFilter('StringTrim');
     $teachableDistricts->setRequired(false);
     $teachableDistricts->setAttrib('disabled', true);
     $teachableDistricts->setDescription('<span id="districts-modal" class="btn btn-info" title="Chọn quận">...</span>');
     $teachableDistricts->setDecorators(array('ViewHelper', array('Description', array('escape' => false)), array(array('control' => 'HtmlTag'), array('tag' => 'div', 'class' => 'element-control col-lg-6')), array('Label', array('class' => 'control-label col-lg-2')), array(array('controls' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'))));
     $this->addElement($teachableDistricts);
     $avatar = new Zend_Form_Element_Hidden('Upload');
     $avatar->setLabel('Hình đại diện');
     $avatar->setRequired(false);
     $avatar->setDescription('fieldlabel');
     $avatar->setDecorators(array('ViewHelper', array(array('Description' => 'HtmlTag'), array('tag' => 'div', 'id' => "file-uploader")), array(array('Errors' => 'HtmlTag'), array('placement' => 'append', 'tag' => 'img', 'id' => 'progress-img', 'src' => "/scripts/upload/loading.gif")), array(array('control' => 'HtmlTag'), array('tag' => 'div', 'class' => 'element-control', 'style' => "position: relative;float: left;margin-left: 20px;")), array('Label', array('class' => 'control-label')), array(array('controls' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'))));
     $this->addElement($avatar);
     $avatarNote = new Zend_Form_Element_Hidden('Avatar');
     $avatarNote->setLabel('Chú ý');
     $avatarNote->setRequired(false);
     $avatarNote->setDescription("Kích thước khoảng: 240 x 120 (px)<br>Kích cỡ cho phép: " . IMAGE_SIZE_LIMIT . " kB");
     $avatarNote->setDecorators(array('ViewHelper', array('Description', array('escape' => false, 'tag' => 'div')), array(array('control' => 'HtmlTag'), array('tag' => 'div', 'class' => 'element-control')), array('Label', array('class' => 'control-label')), array(array('controls' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group', 'style' => "float: left;"))));
     $this->addElement($avatarNote);
     $introduction = new Zend_Form_Element_Textarea('Introduction');
     $introduction->setLabel('Giới thiệu bản thân');
开发者ID:hocondoimeo,项目名称:giasu-tam.com,代码行数:67,代码来源:Tutors.php


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