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


PHP Text::setLabelAttributes方法代码示例

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


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

示例1: __construct

 public function __construct($name = null)
 {
     parent::__construct('reginfo');
     $id_hidden = new Element\Hidden('id');
     $id_hidden->setName('id');
     $email_text = new Element\Text('login');
     $email_text->setLabel('E-mail');
     $email_text->setLabelAttributes(array('class' => 'type_text'));
     $email_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...', 'disabled' => 'disable'));
     $type_text = new Element\Text('type');
     $type_text->setLabel('Type');
     $type_text->setLabelAttributes(array('class' => 'type_text'));
     $type_text->setAttributes(array('class' => 'type_text_input', 'disabled' => 'disable'));
     $password_text = new Element\Password('password');
     $password_text->setLabel('New password');
     $password_text->setLabelAttributes(array('class' => 'type_text'));
     $password_text->setAttributes(array('id' => 'password', 'class' => 'type_text_input'));
     $cpassword_text = new Element\Password('cpassword');
     $cpassword_text->setLabel('Confirm password');
     $cpassword_text->setLabelAttributes(array('class' => 'type_text'));
     $cpassword_text->setAttributes(array('id' => 'cpassword', 'class' => 'type_text_input'));
     $this->add($id_hidden);
     $this->add($email_text);
     $this->add($type_text);
     $this->add($password_text);
     $this->add($cpassword_text);
 }
开发者ID:KukaBazuka,项目名称:zendy,代码行数:27,代码来源:RegInfoForm.php

示例2: addElements

 public function addElements()
 {
     //-- Profile name --
     $login = new Element\Text('profile_name');
     $login->setAttribute('placeholder', 'profile_name');
     $login->setAttribute('required', 'true');
     $login->setAttribute('class', 'form-control');
     $login->setAttribute('id', 'profile-name');
     $login->setLabel('Profile name');
     $login->setLabelAttributes(array('class' => 'control-label', 'for' => 'profile-name'));
     //-- Password --
     $password = new Element\Password('password');
     $password->setAttribute('placeholder', '*****');
     $password->setAttribute('required', 'true');
     $password->setAttribute('class', 'form-control');
     $password->setAttribute('id', 'password');
     $password->setLabel('Password');
     $password->setLabelAttributes(array('class' => 'control-label', 'for' => 'password'));
     //-- Submit --
     $submit = new Element\Submit('submit');
     $submit->setAttribute('class', 'btn btn-success');
     $submit->setValue('Send');
     // Binding elements
     $this->add($login);
     $this->add($password);
     $this->add($submit);
 }
开发者ID:anton-phpcurs,项目名称:aperture,代码行数:27,代码来源:LoginForm.php

示例3: __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

示例4: __construct

 public function __construct($name = null, $options = array())
 {
     parent::__construct(isset($name) ? $name : 'personal');
     $id_hidden = new Element\Hidden('id');
     $id_hidden->setName('id');
     $firstname_text = new Element\Text('firstname');
     $firstname_text->setLabel('First name');
     $firstname_text->setLabelAttributes(array('class' => 'type_text'));
     $firstname_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...'));
     $lastname_text = new Element\Text('lastname');
     $lastname_text->setLabel('Last name');
     $lastname_text->setLabelAttributes(array('class' => 'type_text'));
     $lastname_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...', 'required' => true));
     $country_select = new Element\Select('country_id');
     $country_select->setLabel('Country');
     $country_select->setLabelAttributes(array('class' => 'select f_3_w50'));
     $country_select->setAttributes(array('class' => 'sel_chosen'));
     $country_select->setOptions(array('disable_inarray_validator' => true, 'empty_option' => 'Please choose your country'));
     $state_select = new Element\Select('state_id');
     $state_select->setLabel('Province/State');
     $state_select->setLabelAttributes(array('class' => 'select f_3_w50'));
     $state_select->setAttributes(array('class' => 'sel_chosen', 'required' => true));
     $state_select->setOptions(array('disable_inarray_validator' => true, 'empty_option' => 'Please choose your state'));
     $city_select = new Element\Select('city_id');
     $city_select->setLabel('City');
     $city_select->setLabelAttributes(array('class' => 'select f_3_w50'));
     $city_select->setAttributes(array('class' => 'sel_chosen', 'required' => true));
     $city_select->setOptions(array('disable_inarray_validator' => true, 'empty_option' => 'Please choose your city'));
     $adress_text = new Element\Text('adress');
     $adress_text->setLabel('Adress');
     $adress_text->setLabelAttributes(array('class' => 'type_text'));
     $adress_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type adress in format (наш формат)'));
     $languages_select = new Element\Select('languages');
     $languages_select->setLabel('Languages');
     $languages_select->setLabelAttributes(array('class' => 'select', 'style' => 'float:left;'));
     $languages_select->setAttributes(array('class' => 'sel_chosen', 'multiple' => 'multiple', 'required' => true));
     $languages_select->setOptions(array('disable_inarray_validator' => true));
     $logo = new Element\Image('logo');
     $logo->setAttributes(array('src', '/images/11.jpg', 'style' => 'float:left;'));
     $file = new Element\File('file');
     $file->setLabelAttributes(array('style' => 'float:left;clear:both'));
     $this->add($id_hidden);
     $this->add($firstname_text);
     $this->add($lastname_text);
     $this->add($country_select);
     $this->add($state_select);
     $this->add($city_select);
     $this->add($adress_text);
     $this->add($languages_select);
     $this->add($logo);
     $this->add($file);
 }
开发者ID:KukaBazuka,项目名称:zendy,代码行数:52,代码来源:PersonalForm.php

示例5: __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

示例6: __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

示例7: addElements

 public function addElements()
 {
     //-- Profile name --
     $keyA = new Element\Text('activation_key');
     $keyA->setAttribute('placeholder', md5('Example'));
     //$keyA->setAttribute('required', 'true');
     $keyA->setAttribute('class', 'form-control');
     $keyA->setAttribute('id', 'activation-key');
     $keyA->setLabel('Activation key');
     $keyA->setLabelAttributes(array('class' => 'control-label', 'for' => 'activation-key'));
     //-- Submit --
     $submit = new Element\Submit('submit');
     $submit->setAttribute('class', 'btn btn-success');
     $submit->setValue('Send');
     //-- Submit --
     $submit_email = new Element\Submit('submit_email');
     $submit_email->setAttribute('class', 'btn btn-info');
     $submit_email->setValue('Send Email');
     // Binding elements
     $this->add($keyA);
     $this->add($submit);
     $this->add($submit_email);
 }
开发者ID:anton-phpcurs,项目名称:aperture,代码行数:23,代码来源:ActiveForm.php

示例8: 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

示例9: __construct

 public function __construct()
 {
     parent::__construct('offline');
     $this->setHydrator(new ArraySerializableHydrator(false));
     $country_select = new Element\Select('country_id');
     $country_select->setLabel('Country');
     $country_select->setLabelAttributes(array('class' => 'select f_3_w50'));
     $country_select->setAttributes(array('class' => 'sel_chosen', 'required' => true));
     $country_select->setOptions(array('disable_inarray_validator' => true, 'empty_option' => 'Please choose your country'));
     $state_select = new Element\Select('state_id');
     $state_select->setLabel('Province/State');
     $state_select->setLabelAttributes(array('class' => 'select f_3_w50'));
     $state_select->setAttributes(array('class' => 'sel_chosen', 'required' => true));
     $state_select->setOptions(array('disable_inarray_validator' => true, 'empty_option' => 'Please choose your state'));
     $city_select = new Element\Select('city_id');
     $city_select->setLabel('City');
     $city_select->setLabelAttributes(array('class' => 'select f_3_w50'));
     $city_select->setAttributes(array('class' => 'sel_chosen', 'required' => true));
     $city_select->setOptions(array('disable_inarray_validator' => true, 'empty_option' => 'Please choose your city'));
     $adress_text = new Element\Text('address');
     $adress_text->setLabel('Adress');
     $adress_text->setLabelAttributes(array('class' => 'type_text'));
     $adress_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type adress in format', 'required' => true));
     $this->add($country_select);
     $this->add($state_select);
     $this->add($city_select);
     $this->add($adress_text);
     $this->add(array('type' => 'Button', 'name' => 'submit', 'options' => array('label' => 'delete'), 'attributes' => array('class' => 'btn btn btn_red3')));
 }
开发者ID:KukaBazuka,项目名称:zendy,代码行数:29,代码来源:ServicesForm.php


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