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


PHP Zend_Form_Element_Checkbox::SetLabel方法代码示例

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


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

示例1: __construct

 public function __construct($options = null)
 {
     $periods = new Periods();
     $period_options = $periods->getCoinsPeriod();
     parent::__construct($options);
     $this->setName('ruler');
     $decorators = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'append', 'class' => 'error', 'tag' => 'li')), array('Label'), array('HtmlTag', array('tag' => 'li')));
     $issuer = new Zend_Form_Element_Text('issuer');
     $issuer->setLabel('Ruler or issuer name: ')->setRequired(true)->addErrorMessage('Please enter a name for this issuer or ruler.')->setDecorators($decorators)->setAttrib('size', 70)->addValidator('Alnum', false, array('allowWhiteSpace' => true))->addFilters(array('StripTags', 'StringTrim'));
     $date1 = new Zend_Form_Element_Text('date1');
     $date1->setLabel('Date issued from: ')->setRequired(true)->setDecorators($decorators)->addErrorMessage('You must enter a date for the start of their issue.')->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits');
     $date2 = new Zend_Form_Element_Text('date2');
     $date2->setLabel('Date issued to: ')->setRequired(true)->setDecorators($decorators)->addErrorMessage('You must enter a date for the end of their issue.')->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits');
     $valid = new Zend_Form_Element_Checkbox('valid');
     $valid->SetLabel('Is this ruler or issuer currently valid: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->setDecorators($decorators);
     $period = new Zend_Form_Element_Select('period');
     $period->setLabel('Broad period attributed to: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => NULL, 'Choose reason' => $period_options))->addValidator('InArray', false, array(array_keys($period_options)))->setDecorators($decorators)->addErrorMessage('You must enter a period for this ruler/issuer');
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_config->form->salt)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('label')->setTimeout(4800);
     //Submit button
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton')->setAttrib('class', 'large')->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag');
     $this->addElements(array($issuer, $date1, $date2, $period, $valid, $submit, $hash));
     $this->addDisplayGroup(array('issuer', 'date1', 'date2', 'period', 'valid', 'submit'), 'details');
     $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->details->setLegend('Issuer or ruler details: ');
     $this->details->removeDecorator('DtDdWrapper');
     $this->details->removeDecorator('HtmlTag');
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:29,代码来源:RulerForm.php

示例2: __construct

 public function __construct($options = null)
 {
     $periods = new Periods();
     $period_actives = $periods->getCoinsPeriod();
     parent::__construct($options);
     $decorators = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'append', 'class' => 'error', 'tag' => 'li')), array('Label'), array('HtmlTag', array('tag' => 'li')));
     $this->setName('coinsclass');
     $referenceName = new Zend_Form_Element_Text('referenceName');
     $referenceName->setLabel('Reference volume title: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators)->setAttrib('size', 60);
     $valid = new Zend_Form_Element_Checkbox('valid');
     $valid->SetLabel('Is this volume currently valid: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators);
     $period = new Zend_Form_Element_Select('period');
     $period->setLabel('Period: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('inArray', false, array(array_keys($period_actives)))->addMultiOptions(array(NULL => NULL, 'Choose period:' => $period_actives))->addErrorMessage('You must enter a period for this mint')->setDecorators($decorators);
     //Submit button
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submit')->setAttrib('class', 'large')->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag');
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_config->form->salt)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('label')->setTimeout(60);
     $this->addElement($hash);
     $this->addElements(array($referenceName, $valid, $period, $submit));
     $this->addDisplayGroup(array('referenceName', 'period', 'valid'), 'details')->removeDecorator('HtmlTag');
     $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->details->setLegend('Mint details: ');
     $this->details->removeDecorator('DtDdWrapper');
     $this->addDisplayGroup(array('submit'), 'submit');
 }
开发者ID:rwebley,项目名称:Beowulf---PAS,代码行数:26,代码来源:CoinClassForm.php

示例3: __construct

 /** The constructor
  * @access public
  * @param array $options
  * @return void
  */
 public function __construct(array $options = null)
 {
     $periods = new Periods();
     $period_options = $periods->getCoinsPeriod();
     parent::__construct($options);
     $this->setName('ruler');
     $issuer = new Zend_Form_Element_Text('issuer');
     $issuer->setLabel('Ruler or issuer name: ')->setRequired(true)->addErrorMessage('Please enter a name for this issuer or ruler.')->setAttrib('size', 70)->addFilters(array('StripTags', 'StringTrim', 'Purifier'));
     $date1 = new Zend_Form_Element_Text('date1');
     $date1->setLabel('Date issued from: ')->setRequired(true)->addErrorMessage('You must enter a date for the start of their issue.')->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits');
     $date2 = new Zend_Form_Element_Text('date2');
     $date2->setLabel('Date issued to: ')->setRequired(true)->addErrorMessage('You must enter a date for the end of their issue.')->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits');
     $valid = new Zend_Form_Element_Checkbox('valid');
     $valid->SetLabel('Is this ruler or issuer currently valid: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int');
     $period = new Zend_Form_Element_Select('period');
     $period->setLabel('Broad period attributed to: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Choose a period', 'Available periods' => $period_options))->addValidator('InArray', false, array(array_keys($period_options)))->addErrorMessage('You must enter a period for this ruler/issuer');
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_salt)->setTimeout(4800);
     //Submit button
     $submit = new Zend_Form_Element_Submit('submit');
     $this->addElements(array($issuer, $date1, $date2, $period, $valid, $submit, $hash));
     $this->addDisplayGroup(array('issuer', 'date1', 'date2', 'period', 'valid', 'submit'), 'details');
     $this->details->setLegend('Issuer or ruler details: ');
     parent::init();
 }
开发者ID:lesleyauk,项目名称:findsorguk,代码行数:30,代码来源:RulerForm.php

示例4: __construct

 /** The constructor
  * @access public
  * @param array $options
  * @return void
  */
 public function __construct(array $options = null)
 {
     parent::__construct($options);
     $this->setName('ironagetribes');
     $tribe = new Zend_Form_Element_Text('tribe');
     $tribe->setLabel('Tribe name: ')->setRequired(true)->setAttrib('size', 60)->addFilters(array('StripTags', 'StringTrim', 'Purifier'))->addErrorMessage('You must enter a name for the tribe.');
     $description = new Pas_Form_Element_CKEditor('description');
     $description->setLabel('Description of the tribe: ')->setRequired(false)->setAttrib('rows', 10)->setAttrib('cols', 40)->setAttrib('Height', 400)->setAttrib('ToolbarSet', 'Finds')->addFilters(array('StringTrim', 'BasicHtml', 'EmptyParagraph', 'WordChars'));
     $valid = new Zend_Form_Element_Checkbox('valid');
     $valid->SetLabel('Is this tribe currently valid: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int');
     $submit = new Zend_Form_Element_Submit('submit');
     $this->addElements(array($tribe, $description, $valid, $submit));
     $this->addDisplayGroup(array('tribe', 'description', 'valid', 'submit'), 'details');
     parent::init();
 }
开发者ID:lesleyauk,项目名称:findsorguk,代码行数:20,代码来源:IronAgeTribeForm.php

示例5: __construct

 /** The constructor
  * @access public
  * @param array $options
  * @return void
  */
 public function __construct(array $options = null)
 {
     $periods = new Periods();
     $period_actives = $periods->getCoinsPeriod();
     parent::__construct($options);
     $this->setName('coinsclass');
     $referenceName = new Zend_Form_Element_Text('referenceName');
     $referenceName->setLabel('Reference volume title: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->setAttrib('size', 60);
     $valid = new Zend_Form_Element_Checkbox('valid');
     $valid->SetLabel('Is this volume currently valid: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'));
     $period = new Zend_Form_Element_Select('period');
     $period->setLabel('Period: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addValidator('inArray', false, array(array_keys($period_actives)))->addMultiOptions(array(null => 'Choose a period', 'Available periods:' => $period_actives))->addErrorMessage('You must enter a period for this mint');
     //Submit button
     $submit = new Zend_Form_Element_Submit('submit');
     $this->addElements(array($referenceName, $valid, $period, $submit));
     $this->addDisplayGroup(array('referenceName', 'period', 'valid'), 'details');
     $this->details->setLegend('Mint details: ');
     $this->addDisplayGroup(array('submit'), 'buttons');
     parent::init();
 }
开发者ID:lesleyauk,项目名称:findsorguk,代码行数:25,代码来源:CoinClassForm.php

示例6: __construct

 /** The constructor
  * @access public
  * @param array $options
  * @return void
  */
 public function __construct(array $options = null)
 {
     $periods = new Periods();
     $period_actives = $periods->getMintsActive();
     parent::__construct($options);
     $this->setName('mint');
     $mint_name = new Zend_Form_Element_Text('mint_name');
     $mint_name->setLabel('Mint name: ')->setRequired(true)->addValidator('Alnum', false, array('allowWhiteSpace' => true))->addFilters(array('StripTags', 'StringTrim'))->setAttrib('size', 70);
     $valid = new Zend_Form_Element_Checkbox('valid');
     $valid->SetLabel('Is this ruler or issuer currently valid: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int');
     $period = new Zend_Form_Element_Select('period');
     $period->setLabel('Period: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Choose period', 'Available periods:' => $period_actives))->addValidator('InArray', false, array(array_keys($period_actives)))->addErrorMessage('You must enter a period for this mint');
     //Submit button
     $submit = new Zend_Form_Element_Submit('submit');
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_salt)->setTimeout(4800);
     $this->addElements(array($mint_name, $valid, $period, $hash, $submit));
     $this->addDisplayGroup(array('mint_name', 'period', 'valid', 'submit'), 'details');
     $this->details->setLegend('Mint details: ');
     parent::init();
 }
开发者ID:lesleyauk,项目名称:findsorguk,代码行数:26,代码来源:MintForm.php

示例7: __construct

 /** The constructor
  * @access public
  * @param array $options
  * @return void
  */
 public function __construct(array $options = null)
 {
     $roles = new StaffRoles();
     $role_options = $roles->getOptions();
     $institutions = new Institutions();
     $insts = $institutions->getInsts();
     $staffregions = new StaffRegions();
     $staffregions_options = $staffregions->getOptions();
     $countries = new Countries();
     $countries_options = $countries->getOptions();
     $users = new Users();
     $users_options = $users->getOptions();
     parent::__construct($options);
     $this->setName('contact');
     $firstname = new Zend_Form_Element_Text('firstname');
     $firstname->setLabel('First name: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('You must enter a firstname')->addValidator('StringLength', false, array(1, 200));
     $lastname = new Zend_Form_Element_Text('lastname');
     $lastname->setLabel('Last name: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('StringLength', false, array(1, 200))->addErrorMessage('You must enter a lastname');
     $role = new Zend_Form_Element_Select('role');
     $role->setLabel('Role within the Scheme: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Choose a role', 'Available roles' => $role_options))->addErrorMessage('You must choose a role');
     $dbaseID = new Zend_Form_Element_Select('dbaseID');
     $dbaseID->setLabel('Database account: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Choose account', 'Available accounts' => $users_options))->addErrorMessage('You must enter a database account.');
     $email_one = new Zend_Form_Element_Text('email_one');
     $email_one->SetLabel('Primary email address: ')->setRequired(true)->setAttrib('size', 50)->addFilters(array('StripTags', 'StringTrim'))->addValidator('StringLength', false, array(1, 200))->addValidator('EmailAddress', false)->addErrorMessage('You must enter an email address');
     $email_two = new Zend_Form_Element_Text('email_two');
     $email_two->SetLabel('Secondary email address: ')->setAttrib('size', 50)->addFilters(array('StripTags', 'StringTrim'))->addValidator('StringLength', false, array(1, 200))->addValidator('EmailAddress', false);
     $address_1 = new Zend_Form_Element_Text('address_1');
     $address_1->SetLabel('Address line one: ')->setRequired(true)->setAttrib('size', 50)->addFilters(array('StripTags', 'StringTrim'))->addValidator('StringLength', false, array(1, 200))->addErrorMessage('You must enter a first line for the address');
     $address_2 = new Zend_Form_Element_Text('address_2');
     $address_2->SetLabel('Address line two: ')->setAttrib('size', 50)->addFilters(array('StripTags', 'StringTrim'))->addValidator('StringLength', false, array(1, 200));
     $town = new Zend_Form_Element_Text('town');
     $town->SetLabel('Town: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('StringLength', false, array(1, 200))->addErrorMessage('You must enter a town');
     $county = new Zend_Form_Element_Text('county');
     $county->SetLabel('County: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('StringLength', false, array(1, 200))->addErrorMessage('You must enter a county or unitary authority');
     $euroregion = new Zend_Form_Element_Text('euroregion');
     $euroregion->SetLabel('Administrative region: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addValidator('StringLength', false, array(1, 200));
     $postcode = new Zend_Form_Element_Text('postcode');
     $postcode->SetLabel('Postcode: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('ValidPostCode')->addValidator('StringLength', false, array(1, 200))->addErrorMessage('You must enter a postal code');
     $country = new Zend_Form_Element_Select('country');
     $country->SetLabel('Country: ')->setRequired(true)->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StripTags', 'StringTrim'))->addValidator('StringLength', false, array(1, 200))->addValidator('InArray', false, array(array_keys($countries_options)));
     $telephone = new Zend_Form_Element_Text('telephone');
     $telephone->SetLabel('Telephone number: ')->setRequired(true)->setAttrib('size', 50)->addFilters(array('StripTags', 'StringTrim'))->addValidator('StringLength', false, array(1, 200))->addErrorMessage('You must enter a telephone number');
     $fax = new Zend_Form_Element_Text('fax');
     $fax->SetLabel('Fax number: ')->setRequired(false)->setAttrib('size', 50)->addFilters(array('StripTags', 'StringTrim'))->addValidator('StringLength', false, array(1, 200));
     $identifier = new Zend_Form_Element_Select('identifier');
     $identifier->SetLabel('Database entry identifier: ')->setRequired(true)->addMultiOptions(array(null => null, 'Choose institution' => $insts))->addValidator('InArray', false, array(array_keys($insts)))->addFilters(array('StripTags', 'StringTrim'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addValidator('StringLength', false, array(1, 6));
     $region = new Zend_Form_Element_Select('region');
     $region->SetLabel('Recording region: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addValidator('StringLength', false, array(1, 10))->addValidator('InArray', false, array(array_keys($staffregions_options)))->addMultiOptions(array(null => null, 'Choose staff region' => $staffregions_options));
     $profile = new Pas_Form_Element_CKEditor('profile');
     $profile->setLabel('Profile: ')->setRequired(false)->setAttrib('rows', 10)->setAttrib('cols', 40)->setAttrib('Height', 400)->setAttrib('ToolbarSet', 'Finds')->addFilter('StringTrim')->addFilter('BasicHtml')->addFilter('EmptyParagraph')->addFilter('WordChars');
     $website = new Zend_Form_Element_Text('website');
     $website->SetLabel('Employer\'s website address: ')->setRequired(false)->setAttrib('size', 50)->addFilters(array('StripTags', 'StringTrim'))->addValidator('StringLength', false, array(1, 150));
     $alumni = new Zend_Form_Element_Checkbox('alumni');
     $alumni->SetLabel('Currently employed by the Scheme: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'));
     $submit = new Zend_Form_Element_Submit('submit');
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_salt)->setTimeout(4800);
     $this->addElements(array($firstname, $lastname, $role, $dbaseID, $email_one, $email_two, $address_1, $address_2, $town, $postcode, $county, $identifier, $telephone, $fax, $region, $profile, $website, $alumni, $submit, $hash));
     $this->addDisplayGroup(array('firstname', 'lastname', 'role', 'dbaseID', 'identifier', 'region', 'profile', 'email_one', 'email_two', 'address_1', 'address_2', 'town', 'postcode', 'county', 'telephone', 'fax', 'website', 'alumni'), 'details');
     $this->addDisplayGroup(array('submit'), 'buttons');
     $this->details->setLegend('Contact details');
     parent::init();
 }
开发者ID:lesleyauk,项目名称:findsorguk,代码行数:68,代码来源:ContactForm.php


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