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


PHP Textarea::setLabelAttributes方法代码示例

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


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

示例1: __construct

 public function __construct($name = null)
 {
     parent::__construct('page');
     $id_hidden = new Element\Hidden('id');
     $id_hidden->setName('id');
     $title_text = new Element\Text('title');
     $title_text->setLabel('Title');
     $title_text->setLabelAttributes(array('class' => 'type_text type_text_short'));
     $title_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...', 'required' => 'require'));
     $url_text = new Element\Text('url');
     $url_text->setLabel('Url');
     $url_text->setLabelAttributes(array('class' => 'type_text type_text_short'));
     $url_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...', 'required' => 'require'));
     $text_textarea = new Element\Textarea('text');
     $text_textarea->setLabel('Text');
     $text_textarea->setLabelAttributes(array('class' => 'type_text'));
     $text_textarea->setAttributes(array('placeholder' => 'Type something...'));
     $auto_check = new Element\Checkbox('auto');
     $auto_check->setLabel('Automatically');
     $auto_check->setLabelAttributes(array('class' => 'type_text type_check'));
     $auto_check->setUseHiddenElement(true);
     $auto_check->setCheckedValue("1");
     $auto_check->setUncheckedValue("0");
     $auto_check->setValue('1');
     $meta_text = new Element\Text('meta');
     $meta_text->setLabel('Meta');
     $meta_text->setLabelAttributes(array('class' => 'type_text type_text_mod_darker'));
     $meta_text->setAttributes(array('class' => 'type_text_input'));
     $keywords_text = new Element\Text('keywords');
     $keywords_text->setLabel('Keywords');
     $keywords_text->setLabelAttributes(array('class' => 'type_text type_text_mod_darker'));
     $keywords_text->setAttributes(array('class' => 'type_text_input'));
     $desc_text = new Element\Text('description');
     $desc_text->setLabel('Description');
     $desc_text->setLabelAttributes(array('class' => 'type_text type_text_mod_darker'));
     $desc_text->setAttributes(array('class' => 'type_text_input'));
     $submit_button = new Element\Submit('submit');
     $submit_button->setValue('Submit');
     $submit_button->setAttributes(array('class' => 'btn btn_white'));
     $cancel_button = new Element\Submit('cancel');
     $cancel_button->setValue('Cancel');
     $cancel_button->setAttributes(array('class' => 'btn btn_rozy'));
     $this->add($id_hidden);
     $this->add($title_text);
     $this->add($url_text);
     $this->add($text_textarea);
     $this->add($auto_check);
     $this->add($meta_text);
     $this->add($keywords_text);
     $this->add($desc_text);
     $this->add($submit_button);
     $this->add($cancel_button);
 }
开发者ID:KukaBazuka,项目名称:zendy,代码行数:53,代码来源:PageForm.php

示例2: __construct

 public function __construct($name = null)
 {
     parent::__construct('links');
     $weight_hidden = new Element\Hidden('weight');
     $title_text = new Element\Text('name');
     $title_text->setLabel('Title');
     $title_text->setLabelAttributes(array('class' => 'type_text'));
     $title_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...', 'required' => true));
     $url_text = new Element\Url('ref');
     $url_text->setLabel('Url');
     $url_text->setLabelAttributes(array('class' => 'type_text'));
     $url_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...', 'required' => true));
     $description_textarea = new Element\Textarea('description');
     $description_textarea->setLabel('Description');
     $description_textarea->setLabelAttributes(array('class' => 'type_text'));
     $description_textarea->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...'));
     $this->add($weight_hidden);
     $this->add($title_text);
     $this->add($url_text);
     $this->add($description_textarea);
 }
开发者ID:KukaBazuka,项目名称:zendy,代码行数:21,代码来源:LinksForm.php

示例3: __construct

 public function __construct($name = null)
 {
     parent::__construct('terms');
     $id_hidden = new Element\Hidden('id');
     $id_hidden->setName('id');
     $orders_radio = new Element\Radio('custom_orders');
     $orders_radio->setLabel('Custom orders');
     $orders_radio->setValueOptions(array('0' => 'No', '1' => 'Yes'));
     $shipping_select = new Element\Select('shipping');
     $shipping_select->setLabel('Shipping');
     $shipping_select->setLabelAttributes(array('class' => 'select f_3_w50'));
     $shipping_select->setAttributes(array('class' => 'sel_chosen'));
     $shipping_select->setOptions(array('disable_inarray_validator' => true, 'empty_option' => 'Please choose your shipping'));
     $policies_text = new Element\Textarea('wholesale_policies');
     $policies_text->setLabel('Wholesale policies');
     $policies_text->setLabelAttributes(array('class' => 'type_text'));
     $policies_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...'));
     $this->add($id_hidden);
     $this->add($orders_radio);
     $this->add($shipping_select);
     $this->add($policies_text);
 }
开发者ID:KukaBazuka,项目名称:zendy,代码行数:22,代码来源:TermsForm.php

示例4: __construct

 public function __construct($name = null, $options = array())
 {
     parent::__construct(isset($name) ? $name : 'about');
     $id_hidden = new Element\Hidden('id');
     $id_hidden->setName('id');
     $specialty_text = new Element\Text('specialty');
     $specialty_text->setLabel('Specialty');
     $specialty_text->setLabelAttributes(array('class' => 'type_text'));
     $specialty_text->setAttributes(array('class' => 'type_text_input'));
     $proficiency_select = new Element\Select('proficiency_level');
     $proficiency_select->setLabel('Proficiency level');
     $proficiency_select->setLabelAttributes(array('class' => 'select f_3_w50'));
     $proficiency_select->setAttributes(array('class' => 'sel_chosen'));
     $proficiency_select->setOptions(array('disable_inarray_validator' => true, 'empty_option' => 'Please choose your proficiency'));
     $about_textarea = new Element\Textarea('about');
     $about_textarea->setLabel('About');
     $about_textarea->setLabelAttributes(array('class' => 'type_text'));
     $about_textarea->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...', 'required' => 'require'));
     $this->add($id_hidden);
     $this->add($specialty_text);
     $this->add($proficiency_select);
     $this->add($about_textarea);
 }
开发者ID:KukaBazuka,项目名称:zendy,代码行数:23,代码来源:AboutForm.php

示例5: addElements

 public function addElements()
 {
     //-- Full name --
     $full_name = new Element\Text('full_name');
     $full_name->setAttribute('placeholder', 'Full Name');
     $full_name->setAttribute('class', 'form-control');
     $full_name->setAttribute('id', 'full-name');
     $full_name->setLabel('Full name');
     $full_name->setLabelAttributes(array('class' => 'control-label', 'for' => 'full-name'));
     //-- Bio --
     $bio = new Element\Textarea('bio');
     $bio->setAttribute('placeholder', 'Bio');
     $bio->setAttribute('class', 'form-control');
     $bio->setAttribute('id', 'bio');
     $bio->setLabel('Bio');
     $bio->setLabelAttributes(array('class' => 'control-label', 'for' => 'bio'));
     //-- Link skype --
     $link_skype = new Element\Text('link_skype');
     $link_skype->setAttribute('placeholder', 'skype_name');
     $link_skype->setAttribute('class', 'form-control');
     $link_skype->setAttribute('id', 'link-skype');
     $link_skype->setLabel('Skype');
     $link_skype->setLabelAttributes(array('class' => 'control-label', 'for' => 'link-skype'));
     //-- Link site --
     $link_site = new Element\Text('link_site');
     $link_site->setAttribute('placeholder', 'http://my-site.com');
     $link_site->setAttribute('class', 'form-control');
     $link_site->setAttribute('id', 'link-site');
     $link_site->setLabel('Link my site');
     $link_site->setLabelAttributes(array('class' => 'control-label', 'for' => 'link-site'));
     //-- Link vkontakte --
     $link_vk = new Element\Text('link_vk');
     $link_vk->setAttribute('placeholder', 'http://vk.com/user_name');
     $link_vk->setAttribute('class', 'form-control');
     $link_vk->setAttribute('id', 'link-vk');
     $link_vk->setLabel('Link VKontakte');
     $link_vk->setLabelAttributes(array('class' => 'control-label', 'for' => 'link-vk'));
     //-- Link facebook --
     $link_fb = new Element\Text('link_fb');
     $link_fb->setAttribute('placeholder', 'https://www.facebook.com/user_name');
     $link_fb->setAttribute('class', 'form-control');
     $link_fb->setAttribute('id', 'link-fb');
     $link_fb->setLabel('Link Facebook');
     $link_fb->setLabelAttributes(array('class' => 'control-label', 'for' => 'link-fb'));
     //-- Link twitter --
     $link_tw = new Element\Text('link_tw');
     $link_tw->setAttribute('placeholder', 'https://twitter.com/user_name');
     $link_tw->setAttribute('class', 'form-control');
     $link_tw->setAttribute('id', 'link-tw');
     $link_tw->setLabel('Link Twitter');
     $link_tw->setLabelAttributes(array('class' => 'control-label', 'for' => 'flink-tw'));
     //-- Password --
     $check = new Element\Checkbox('is_active');
     $check->setAttribute('class', 'form-control');
     $check->setAttribute('id', 'is-active');
     $check->setCheckedValue("1");
     $check->setUncheckedValue("0");
     $check->setLabel('Is active');
     $check->setLabelAttributes(array('class' => 'control-label', 'for' => 'is-active'));
     //-- Submit --
     $submit = new Element\Submit('submit');
     $submit->setAttribute('class', 'btn btn-success');
     $submit->setValue('Send');
     // Binding elements
     $this->add($full_name);
     $this->add($bio);
     $this->add($link_skype);
     $this->add($link_site);
     $this->add($link_vk);
     $this->add($link_fb);
     $this->add($link_tw);
     $this->add($check);
 }
开发者ID:anton-phpcurs,项目名称:aperture,代码行数:73,代码来源:OtherForm.php

示例6: __construct

 public function __construct($name = null)
 {
     parent::__construct('services');
     $id_hidden = new Element\Hidden('id');
     $id_hidden->setName('id');
     $tutorial_select = new Element\Select('tutorial_status');
     $tutorial_select->setLabel('Tutorial status');
     $tutorial_select->setLabelAttributes(array('class' => 'select f_3_w50'));
     $tutorial_select->setAttributes(array('class' => 'sel_chosen'));
     $tutorial_select->setOptions(array('disable_inarray_validator' => true, 'empty_option' => 'Please choose your status'));
     $members_select = new Element\Textarea('members_special');
     $members_select->setLabel('Members Special');
     $members_select->setLabelAttributes(array('class' => 'type_text'));
     $members_select->setAttributes(array('class' => 'type_text_input'));
     $this->add($id_hidden);
     $this->add($tutorial_select);
     $this->add($members_select);
     $this->add(array('type' => 'Profile\\Form\\AdressesFieldset'));
 }
开发者ID:KukaBazuka,项目名称:zendy,代码行数:19,代码来源:ServicesForm.php


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