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


PHP Zend_Form_Element_Button::setOrder方法代码示例

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


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

示例1: setButton

 protected function setButton()
 {
     $submit = new Zend_Form_Element_Submit("submit", array("label" => "Salvar"));
     $submit->removeDecorator('DtDdWrapper');
     $submit->addDecorator(array("opentd" => 'HtmlTag'), array('class' => 'form_control_left', 'tag' => 'td'));
     $submit->addDecorator(array("opentr" => 'HtmlTag'), array('tag' => 'tr', 'openOnly' => true, 'placement' => Zend_Form_Decorator_Abstract::PREPEND));
     $submit->setOrder(100);
     $this->addElement($submit);
     $back = new Zend_Form_Element_Button("cancel", array("label" => "Cancelar"));
     $back->setAttrib("onclick", "location.href='javascript:history.back();'");
     $back->removeDecorator('DtDdWrapper');
     $back->addDecorator(array("closetd" => 'HtmlTag'), array('class' => 'form_control_right', 'tag' => 'td'));
     $back->addDecorator(array("closetr" => 'HtmlTag'), array('tag' => 'tr', 'closeOnly' => true, 'placement' => Zend_Form_Decorator_Abstract::APPEND));
     $back->setOrder(101);
     $this->addElement($back);
 }
开发者ID:rootzig,项目名称:SNEP,代码行数:16,代码来源:Simple.php

示例2: __construct

 public function __construct($options = null)
 {
     parent::__construct($options);
     /***************************************/
     // Collection subform
     $collectionForm = new Zend_Form_SubForm();
     // Collection name
     $name = new Zend_Form_Element_Text('NFCS_Name');
     $name->setLabel($this->getView()->getCibleText('form_label_collection_name'))->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->getView()->getCibleText('validation_message_empty_field'))))->setAttrib('class', 'stdTextInput')->setDecorators(array('ViewHelper', array('label', array('placement' => 'append')), array('Errors', array('placement' => 'append')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'label_before_input'))));
     $collectionForm->addElement($name);
     /********************************************************/
     // Add subform to the form
     $this->addSubForm($collectionForm, 'collectionForm');
     /********************************************************/
     // Add button
     $addFilter = new Zend_Form_Element_Button('addFilterSet');
     $addFilter->setLabel($this->getView()->getCibleText('link_add_newsletter_filterSet'));
     $addFilter->setAttrib('class', 'stdButton');
     $addFilter->setDecorators(array('ViewHelper', array(array('data' => 'HtmlTag'), array('tag' => 'li'))));
     $addFilter->setOrder(2);
     $this->addActionButton($addFilter);
 }
开发者ID:anunay,项目名称:stentors,代码行数:22,代码来源:FormNewsletterFilterCollection.php

示例3: __construct

 /** The constructor
  * @access public
  * @param array $options
  * @return void
  */
 public function __construct(array $options = null)
 {
     ## GET OPTIONS TO POPULATE MENUS ##
     //Get periods for select menu
     $periods = new Periods();
     $period_options = $periods->getPeriodFrom();
     $periodword_options = $periods->getPeriodFromWords();
     //Get terminal reasons for select menu
     $terminalreasons = new TerminalReasons();
     $terminalreason_options = $terminalreasons->getReasons();
     //Get coin data quality ratings for select menu
     $qualityrating = new DataQuality();
     $qualityrating_options = $qualityrating->getRatings();
     //Get Find of note reason options for select menu
     $reasons = new Findofnotereasons();
     $reason_options = $reasons->getReasons();
     //Get primary materials for multiselect
     $primarymaterials = new Materials();
     $materials_options = $primarymaterials->getPrimaries();
     //Get discovery methods for select menu
     $discs = new DiscoMethods();
     $disc_options = $discs->getOptions();
     //Get Rally data for select menu
     $rallies = new Rallies();
     $rally_options = $rallies->getRallies();
     //Get Subsequent actions for select menu
     $actions = new SubsequentActions();
     $actionsDD = $actions->getSubActionsDD();
     //Get the reece periods for inclusion
     $reece = new Reeces();
     $reeces = $reece->getReeces();
     //End of select options construction
     $this->addElementPrefixPath('Pas_Filter', 'Pas/Filter/', 'filter');
     parent::__construct($options);
     $this->setName('hoards');
     ## UNIQUE ID FIELDS ##
     $secuid = new Zend_Form_Element_Hidden('secuid');
     $secuid->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum');
     $old_hoardID = new Zend_Form_Element_Hidden('hoardID');
     $old_hoardID->addFilters(array('StripTags', 'StringTrim'));
     ## HOARD DATING ##
     //Broadperiod:
     $broadperiod = new Zend_Form_Element_Select('broadperiod');
     $broadperiod->setLabel('Broad period: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(null => 'Choose broadperiod', 'Available periods' => $periodword_options))->addErrorMessage('You must enter a broad period.')->addValidator('InArray', false, array(array_keys($periodword_options)))->setAttribs(array('class' => 'input-xlarge selectpicker show-menu-arrow'))->setOrder(1);
     //Sub period from: Assigned via dropdown
     $hoardsubperiod1 = new Zend_Form_Element_Select('subperiod1');
     $hoardsubperiod1->setLabel('Sub period from: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim', 'Null'))->addMultiOptions(array(null => 'Choose a subperiod', 'Valid sub periods' => array('1' => 'Early', '2' => 'Middle', '3' => 'Late')))->setAttribs(array('class' => 'selectpicker show-menu-arrow'))->setOrder(2);
     //Period from: Assigned via dropdown
     $hoardperiod1 = new Zend_Form_Element_Select('period1');
     $hoardperiod1->setLabel('Period from: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim', 'Null'))->addMultiOptions(array(null => 'Choose a period from', 'Available periods' => $period_options))->addValidator('InArray', false, array(array_keys($period_options)))->addValidator('Int')->setAttribs(array('class' => 'input-xlarge selectpicker show-menu-arrow'))->setOrder(3);
     //Sub period to: Assigned via dropdown
     $hoardsubperiod2 = new Zend_Form_Element_Select('subperiod2');
     $hoardsubperiod2->setLabel('Sub period to: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim', 'Null'))->addMultiOptions(array(null => 'Choose a subperiod', 'Valid sub periods' => array('1' => 'Early', '2' => 'Middle', '3' => 'Late')))->addValidator('Digits')->setAttribs(array('class' => 'selectpicker show-menu-arrow'))->setOrder(4);
     //Period to: Assigned via dropdown
     $hoardperiod2 = new Zend_Form_Element_Select('period2');
     $hoardperiod2->setLabel('Period to: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim', 'Null'))->addMultiOptions(array(null => 'Choose period to', 'Available periods' => $period_options))->addValidator('InArray', false, array(array_keys($period_options)))->addValidator('Int')->setAttribs(array('class' => 'input-xlarge selectpicker show-menu-arrow'))->setOrder(5);
     //Date from: Free text Integer +ve or -ve
     $numdate1 = new Zend_Form_Element_Text('numdate1');
     $numdate1->setLabel('Date from: ')->setAttrib('size', 10)->setAttribs(array('placeholder' => 'Year in format YYYY'))->addFilters(array('StripTags', 'StringTrim', 'Null'))->addValidator('Int')->setOrder(6);
     //Date to: Free text Integer +ve or -ve
     $numdate2 = new Zend_Form_Element_Text('numdate2');
     $numdate2->setLabel('Date to: ')->setAttrib('size', 10)->setAttribs(array('placeholder' => 'Year in format YYYY'))->addFilters(array('StripTags', 'StringTrim', 'Null'))->addValidator('Int')->setOrder(7);
     ## COIN DATING ##
     //Ruler of latest coins in hoard:
     $lastruler = new Zend_Form_Element_Select('lastrulerID');
     $lastruler->setLabel('Last ruler: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim', 'Null'))->addMultiOptions(array(null => 'Choose ruler after broad period'))->setRegisterInArrayValidator(false)->setAttribs(array('class' => 'input-xlarge selectpicker show-menu-arrow'))->setOrder(8);
     //Ruler of latest coins in hoard:
     $lastreeceperiod = new Zend_Form_Element_Select('reeceID');
     $lastreeceperiod->setLabel('Last Reece period: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim', 'Null'))->addMultiOptions(array(null => 'Choose Reece period', 'Available periods' => $reeces))->setRegisterInArrayValidator(false)->setAttribs(array('class' => 'input-xlarge selectpicker show-menu-arrow'))->setOrder(9);
     //Date from: Free text Integer +ve or -ve
     $terminaldate1 = new Zend_Form_Element_Text('terminalyear1');
     $terminaldate1->setLabel('Terminal date from: ')->setAttrib('size', 10)->setAttribs(array('placeholder' => 'Year in format YYYY'))->addFilters(array('StripTags', 'StringTrim', 'Null'))->addValidator('Int')->setOrder(10);
     //Date to: Free text Integer +ve or -ve
     $terminaldate2 = new Zend_Form_Element_Text('terminalyear2');
     $terminaldate2->setLabel('Terminal date to: ')->setAttrib('size', 10)->setAttribs(array('placeholder' => 'Year in format YYYY'))->addFilters(array('StripTags', 'StringTrim', 'Null'))->addValidator('Int')->setOrder(11);
     //Reason for terminal coin dating
     $terminalreason = new Zend_Form_Element_Select('terminalreason');
     $terminalreason->setLabel('Terminal reason: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim', 'Null'))->addMultiOptions(array(null => 'Choose a reasoning', 'Available reasons' => $terminalreason_options))->addValidator('InArray', false, array(array_keys($terminalreason_options)))->setAttrib('class', 'input-xlarge selectpicker show-menu-arrow')->addValidator('Int')->setOrder(12);
     ## HOARD DETAILS ##
     //Hoard description
     $description = new Pas_Form_Element_CKEditor('description');
     $description->setLabel('Hoard description: ')->setRequired(false)->addFilters(array('StringTrim', 'BasicHtml', 'EmptyParagraph', 'WordChars'))->setOrder(13);
     //Object notes
     $notes = new Pas_Form_Element_CKEditor('notes');
     $notes->setLabel('Notes: ')->setRequired(false)->addFilters(array('StringTrim', 'BasicHtml', 'EmptyParagraph', 'WordChars'))->setOrder(14);
     //Coin data quality rating
     $coindataquality = new Zend_Form_Element_Select('qualityrating');
     $coindataquality->setLabel('Coin data quality rating: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim', 'Null'))->addMultiOptions(array(null => 'Choose a rating', 'Available ratings' => $qualityrating_options))->addValidator('InArray', false, array(array_keys($qualityrating_options)))->setAttrib('class', 'input-large selectpicker show-menu-arrow')->setDescription('This data quality field can only be completed by hoards project staff')->addValidator('Int')->setOrder(15);
     //Find of note
     $findofnote = new Zend_Form_Element_Checkbox('findofnote');
     $findofnote->setLabel('Find of Note: ')->setRequired(false)->setCheckedValue('1')->setUncheckedValue(null)->addFilters(array('StripTags', 'StringTrim', 'Null'))->addValidator('NotEmpty', 'Int')->setOrder(16);
     //Reason for find of note
     $findofnotereason = new Zend_Form_Element_Select('findofnotereason');
     $findofnotereason->setLabel('Why this find is considered noteworthy: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim', 'Null'))->addMultiOptions(array(null => 'Choose a reasoning', 'Available reasons' => $reason_options))->addValidator('InArray', false, array(array_keys($reason_options)))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addValidator('Int')->setOrder(17);
     //Treasure: enumerator 1/0
//.........这里部分代码省略.........
开发者ID:lesleyauk,项目名称:findsorguk,代码行数:101,代码来源:HoardForm.php


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