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


PHP Element::setLabel方法代码示例

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


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

示例1: __construct

 public function __construct($name = null)
 {
     parent::__construct('objetosform');
     $this->setAttribute('method', 'post');
     $this->setAttribute('role', 'form');
     $this->setAttributes(array('id' => 'objetosform'));
     $objetos_actividad_id = new Element('objetos_actividad_id');
     $objetos_actividad_id->setLabel('Actividad');
     $objetos_actividad_id->setAttributes(array('type' => 'text', 'placeholder' => 'Este campo se genera automáticamente', 'id' => 'objetos_actividad_id', 'readonly' => 'readonly', 'class' => 'form-control'));
     $objetos_id = new Element('objetos_id');
     $objetos_id->setLabel('ID');
     $objetos_id->setAttributes(array('type' => 'text', 'placeholder' => 'Este campo se genera automáticamente', 'id' => 'objetos_id', 'readonly' => 'readonly', 'class' => 'form-control'));
     $objetos_nombre = new Element('objetos_nombre');
     $objetos_nombre->setLabel('Nombre');
     $objetos_nombre->setAttributes(array('type' => 'text', 'placeholder' => 'ej: wKER001', 'id' => 'objetos_nombre', 'class' => 'form-control'));
     $objetos_tipo = new Element\Select('objetos_tipo');
     $objetos_tipo->setLabel('Tipo');
     $objetos_tipo->setEmptyOption('Elige un Tipo..');
     $objetos_tipo->setOptions(array('disable_inarray_validator' => true));
     $objetos_tipo->setAttributes(array('id' => 'objetos_tipo', 'class' => "form-control"));
     $guardar = new Element\Button('guardar');
     $guardar->setAttributes(array('class' => 'btn btn-success mr5', 'type' => 'submit', 'id' => 'guardar'));
     $guardar->setOptions(array('label' => '<i class="glyphicon glyphicon-floppy-disk"></i>', 'label_options' => array('disable_html_escape' => true)));
     $etiquetas_id = new Element\Hidden('etiquetas_id');
     $etiquetas_id->setAttributes(array('id' => 'etiquetas_id'));
     $this->add($objetos_actividad_id);
     $this->add($objetos_id);
     $this->add($objetos_nombre);
     $this->add($objetos_tipo);
     $this->add($etiquetas_id);
     $this->add($guardar);
 }
开发者ID:Crisstthian,项目名称:Reminder,代码行数:32,代码来源:ObjetosForm.php

示例2: __construct

 /**
  * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
  */
 public function __construct($entityManager)
 {
     parent::__construct('contatoForm');
     $this->setAttribute('method', 'post');
     $this->setAttribute('id', 'fileupload');
     $this->setEntityManager($entityManager);
     $idContato = new Element('idContato');
     $idContato->setLabel('Contato');
     $idContato->setAttributes(array('name' => 'idContato', 'id' => 'idContato', 'type' => 'hidden'));
     $this->add($idContato);
     $email = new Element('email');
     $email->setLabel('Email');
     $email->setAttributes(array('name' => 'email', 'id' => 'email', 'type' => 'text', 'class' => 'form-control'));
     $this->add($email);
     $assunto = new Element('assunto');
     $assunto->setLabel('Assunto');
     $assunto->setAttributes(array('name' => 'assunto', 'id' => 'assunto', 'type' => 'text', 'class' => 'form-control'));
     $this->add($assunto);
     $mensagem = new Element\Textarea('mensagem');
     $mensagem->setLabel('Mensagem');
     $mensagem->setAttributes(array('name' => 'mensagem', 'id' => 'mensagem', 'type' => 'textarea', 'class' => 'form-control'));
     $this->add($mensagem);
     $submit = new Element('submit');
     $submit->setValue('Salvar');
     $submit->setAttributes(array('type' => 'submit'));
     $this->add($submit);
 }
开发者ID:mauriciopiber,项目名称:sandbox-contact,代码行数:30,代码来源:ContatoForm.php

示例3: __construct

 public function __construct($name = null)
 {
     parent::__construct('datbaseform');
     $this->setAttribute('class', 'p-t-15');
     $this->setAttributes(array('id' => 'form-datos-bd', 'class' => 'form-horizontal'));
     $servidorBd = new Element('servidorBd');
     $servidorBd->setLabel('Servidor de la base de datos:')->setLabelAttributes(array('class' => 'col-sm-3 control-label'));
     $servidorBd->setAttributes(array('type' => 'text', 'placeholder' => 'ej. localhost', 'id' => 'servidorBd', 'class' => 'form-control', 'data-rule-required' => "true", 'data-msg-required' => "Este campo debe estar lleno", 'data-rule-minlength' => "6", 'data-msg-minlength' => "Debe tener al menos 6 caracteres"));
     $nombreBd = new Element('nombreBd');
     $nombreBd->setLabel('Nombre de la base de datos:')->setLabelAttributes(array('class' => 'col-sm-3 control-label required'));
     $nombreBd->setAttributes(array('type' => 'text', 'placeholder' => 'ej. tributum-produccion', 'id' => 'nombreBd', 'class' => 'form-control', 'data-rule-required' => "true", 'data-msg-required' => "Este campo debe estar lleno"));
     $prefijoTablasBd = new Element('prefijoTablasBd');
     $prefijoTablasBd->setLabel('Prefijo de tablas de la base de datos:')->setLabelAttributes(array('class' => 'col-sm-3 control-label'));
     $prefijoTablasBd->setAttributes(array('type' => 'text', 'placeholder' => 'ej. trb-', 'id' => 'prefijoTablasBd', 'class' => 'form-control'));
     $nombreUsuarioBd = new Element('nombreUsuarioBd');
     $nombreUsuarioBd->setLabel('Nombre de usuario de la base de datos:')->setLabelAttributes(array('class' => 'col-sm-3 control-label'));
     $nombreUsuarioBd->setAttributes(array('type' => 'text', 'placeholder' => 'ej. root', 'id' => 'nombreUsuarioBd', 'class' => 'form-control', 'data-rule-required' => "true", 'data-msg-required' => "Este campo debe estar lleno"));
     $contrasenaDb = new Element\Password('contrasenaDb');
     $contrasenaDb->setLabel('Contraseña de la base de datos:')->setLabelAttributes(array('class' => 'col-sm-3 control-label'));
     $contrasenaDb->setAttributes(array('placeholder' => 'Por seguridad este campo es necesario', 'id' => 'contrasenaDb', 'class' => 'form-control'));
     $buttonContinuar = new Element\Button('buttonContinuar');
     $buttonContinuar->setLabel('Continuar');
     $buttonContinuar->setAttributes(array('class' => 'btn btn-success', 'type' => 'submit', 'id' => 'buttonContinuar'));
     $buttonLimpiar = new Element\Button('buttonLimpiar');
     $buttonLimpiar->setLabel('<i class="pg-close"></i> Limpiar')->setLabelOptions(array('disable_html_escape' => true));
     $buttonLimpiar->setAttributes(array('class' => 'btn btn-default', 'id' => 'buttonLimpiar', 'type' => 'reset'));
     $this->add($servidorBd);
     $this->add($nombreBd);
     $this->add($prefijoTablasBd);
     $this->add($nombreUsuarioBd);
     $this->add($contrasenaDb);
     $this->add($buttonContinuar);
     $this->add($buttonLimpiar);
 }
开发者ID:Abianic,项目名称:CoreApp,代码行数:34,代码来源:ConfiguracionDbForm.php

示例4: __construct

 public function __construct($name = null)
 {
     parent::__construct('usuariosform');
     $this->setAttribute('method', 'post');
     $this->setAttribute('role', 'form');
     $this->setAttributes(array('id' => 'usuariosform'));
     $usuarios_id = new Element('usuarios_id');
     $usuarios_id->setLabel('ID');
     $usuarios_id->setAttributes(array('type' => 'text', 'placeholder' => 'Este campo se genera automáticamente', 'id' => 'usuarios_id', 'readonly' => 'readonly', 'class' => 'form-control'));
     $usuarios_username = new Element('usuarios_username');
     $usuarios_username->setLabel('Usuario');
     $usuarios_username->setAttributes(array('type' => 'text', 'placeholder' => 'dvader', 'id' => 'usuarios_username', 'class' => 'form-control'));
     $usuarios_nombres = new Element('usuarios_nombres');
     $usuarios_nombres->setLabel('Nombre');
     $usuarios_nombres->setAttributes(array('type' => 'text', 'placeholder' => 'Darth Vader', 'id' => 'usuarios_nombres', 'class' => 'form-control'));
     $usuarios_estado = new Element\Select('usuarios_estado');
     $usuarios_estado->setLabel('Estado');
     //$usuarios_estado->setEmptyOption('ELige un Estado..');
     $usuarios_estado->setOptions(array('disable_inarray_validator' => true));
     $usuarios_estado->setAttributes(array('id' => 'usuarios_estado', 'class' => "form-control", 'data-rule-required' => "true", 'data-msg-required' => "Debe seleccionar el Estado"));
     $guardar = new Element\Button('guardar');
     $guardar->setAttributes(array('class' => 'btn btn-success mr5', 'type' => 'submit', 'id' => 'guardar'));
     $guardar->setOptions(array('label' => '<i class="glyphicon glyphicon-floppy-disk"></i>', 'label_options' => array('disable_html_escape' => true)));
     $this->add($usuarios_id);
     $this->add($usuarios_username);
     $this->add($usuarios_nombres);
     $this->add($usuarios_estado);
     $this->add($guardar);
 }
开发者ID:Crisstthian,项目名称:Reminder,代码行数:29,代码来源:UsuariosForm.php

示例5: __construct

 public function __construct($name = null)
 {
     parent::__construct('datbaseform');
     $this->setAttribute('class', 'p-t-15');
     $this->setAttributes(array('id' => 'form-datos-bd', 'class' => 'form-horizontal'));
     $username = new Element('username');
     $username->setLabel('Nombre de Usuario:')->setLabelAttributes(array('class' => 'col-sm-3 control-label'));
     $username->setAttributes(array('type' => 'text', 'placeholder' => 'ej. Admin', 'id' => 'username', 'class' => 'form-control', 'data-rule-required' => "true", 'data-msg-required' => "Este campo debe estar lleno", 'data-rule-minlength' => "6", 'data-msg-minlength' => "Debe tener al menos 6 caracteres"));
     $password = new Element\Password('password');
     $password->setLabel('Contraseña:')->setLabelAttributes(array('class' => 'col-sm-3 control-label required'));
     $password->setAttributes(array('placeholder' => 'No uses 1234 ;)', 'id' => 'password', 'class' => 'form-control', 'data-rule-required' => "true", 'data-msg-required' => "Este campo debe estar lleno"));
     $confirmaPassword = new Element\Password('confirmaPassword');
     $confirmaPassword->setLabel(' ')->setLabelAttributes(array('class' => 'col-sm-3 control-label'));
     $confirmaPassword->setAttributes(array('placeholder' => 'Por seguridad este campo es necesario', 'id' => 'confirmaPassword', 'class' => 'form-control'));
     $email = new Element\Email('email');
     $email->setLabel('Correo Electrónico:')->setLabelAttributes(array('class' => 'col-sm-3 control-label'));
     $email->setAttributes(array('placeholder' => 'admin@tudominio.com', 'id' => 'email', 'class' => 'form-control'));
     $buttonContinuar = new Element\Button('buttonContinuar');
     $buttonContinuar->setLabel('Instalar');
     $buttonContinuar->setAttributes(array('class' => 'btn btn-success', 'type' => 'submit', 'id' => 'buttonContinuar'));
     $buttonLimpiar = new Element\Button('buttonLimpiar');
     $buttonLimpiar->setLabel('<i class="pg-close"></i> Limpiar')->setLabelOptions(array('disable_html_escape' => true));
     $buttonLimpiar->setAttributes(array('class' => 'btn btn-default', 'id' => 'buttonLimpiar', 'type' => 'reset'));
     $this->add($username);
     $this->add($password);
     $this->add($email);
     $this->add($confirmaPassword);
     $this->add($buttonContinuar);
     $this->add($buttonLimpiar);
 }
开发者ID:Abianic,项目名称:CoreApp,代码行数:30,代码来源:CreaEsquemaForm.php

示例6: prepare

 public function prepare()
 {
     $username = new Element('username');
     $username->setLabel($this->translate('Your username'));
     $username->setAttributes(['type' => 'text', 'icon' => 'user', 'class' => 'form-control']);
     $email = new Element('email');
     $email->setLabel($this->translate('Email (used to login)'));
     $email->setAttributes(['type' => 'text', 'icon' => 'envelope', 'class' => 'form-control']);
     $password = new Element('password');
     $password->setLabel($this->translate('Password'));
     $password->setAttributes(['type' => 'password', 'id' => 'password', 'icon' => 'lock', 'class' => 'form-control']);
     $confirmPassword = new Element('confirm-password');
     $confirmPassword->setLabel($this->translate('Confirm Password'));
     $confirmPassword->setAttributes(['type' => 'password', 'icon' => 'lock', 'class' => 'form-control']);
     $send = new Element('send');
     $send->setValue($this->translate('Create My Account'));
     $send->setAttributes(['type' => 'submit', 'class' => 'btn btn-default']);
     $this->add($username);
     $this->add($email);
     $this->add($password);
     $this->add($confirmPassword);
     $this->addCaptcha();
     $this->add($send);
     parent::prepare();
 }
开发者ID:netsensia,项目名称:zf2-foundation,代码行数:25,代码来源:RegisterForm.php

示例7: testCanRenderRowLabelAttributes

 public function testCanRenderRowLabelAttributes()
 {
     $element = new Element('foo');
     $element->setLabel('The value for foo:');
     $element->setLabelAttributes(array('class' => 'bar'));
     $this->helper->setLabelPosition('append');
     $markup = $this->helper->render($element);
     $this->assertContains("<label class=\"bar\">", $markup);
 }
开发者ID:nuklehed,项目名称:zf2,代码行数:9,代码来源:FormRowTest.php

示例8: prepare

 public function prepare()
 {
     $email = new Element('passwordreset-email');
     $email->setLabel($this->translate('Email'));
     $email->setAttributes(['id' => 'passwordreset-email', 'type' => 'text', 'icon' => 'envelope', 'class' => 'form-control']);
     $this->add($email);
     $send = new Element('send');
     $send->setValue('Request password reset');
     $send->setAttributes(['type' => 'submit', 'class' => 'btn btn-default']);
     $this->add($send);
     parent::prepare();
 }
开发者ID:netsensia,项目名称:zf2-foundation,代码行数:12,代码来源:PasswordResetForm.php

示例9: __construct

 public function __construct($name = null, $options = array())
 {
     parent::__construct("page", $options);
     $this->setAttribute("method", "post");
     $this->setAttribute("id", "pageform");
     $this->add(array("name" => "id", "attributes" => array("type" => "hidden", "value" => "0")));
     $this->add(array("name" => "article", "attributes" => array("type" => "textarea"), "options" => array("label" => "Description")));
     $title = new Element("title");
     $title->setAttribute("type", "text");
     $title->setLabel("Title");
     $this->add($title);
     $this->add(array("name" => "date", "attributes" => array("type" => "text"), "options" => array("label" => "Publication Date")));
     $this->add(array("name" => "submit", "type" => "submit", "attributes" => array("value" => "Отправить", "id" => "submitbutton", "class" => "btn")));
 }
开发者ID:seyfer,项目名称:zend2-tutorial.me,代码行数:14,代码来源:ContactForm.php

示例10: __construct

 public function __construct($name = null)
 {
     parent::__construct('actividadesform');
     $this->setAttribute('method', 'post');
     $this->setAttribute('role', 'form');
     $this->setAttributes(array('id' => 'actividadesform'));
     $actividades_id = new Element('actividades_id');
     $actividades_id->setLabel('ID');
     $actividades_id->setAttributes(array('type' => 'text', 'placeholder' => 'Este campo se genera automáticamente', 'id' => 'actividades_id', 'readonly' => 'readonly', 'class' => 'form-control'));
     $actividades_nombre = new Element('actividades_nombre');
     $actividades_nombre->setLabel('Nombre');
     $actividades_nombre->setAttributes(array('type' => 'text', 'placeholder' => 'ej: Mi Primera Actividad', 'id' => 'actividades_nombre', 'class' => 'form-control'));
     $actividades_estado = new Element\Select('actividades_estado');
     $actividades_estado->setLabel('Estado');
     //$actividades_estado->setEmptyOption('ELige un Estado..');
     $actividades_estado->setOptions(array('disable_inarray_validator' => true));
     $actividades_estado->setAttributes(array('id' => 'actividades_estado', 'class' => "form-control", 'data-rule-required' => "true", 'data-msg-required' => "Debe seleccionar el Estado"));
     $actividades_responsable = new Element\Select('actividades_responsable');
     $actividades_responsable->setLabel('Responsable');
     // $actividades_responsable->setEmptyOption('Elige un Responsable..');
     $actividades_responsable->setOptions(array('disable_inarray_validator' => true));
     $actividades_responsable->setAttributes(array('id' => 'actividades_responsable', 'class' => "form-control"));
     $actividades_area = new Element\Select('actividades_area');
     $actividades_area->setLabel('Área');
     $actividades_area->setEmptyOption('Elige una Área..');
     $actividades_area->setOptions(array('disable_inarray_validator' => true));
     $actividades_area->setAttributes(array('id' => 'actividades_area', 'class' => "form-control"));
     $actividades_reporta = new Element('actividades_reporta');
     $actividades_reporta->setLabel('Reportada Por');
     $actividades_reporta->setAttributes(array('type' => 'text', 'placeholder' => 'Persona que reporta', 'id' => 'actividades_reporta', 'class' => 'form-control'));
     $actividades_fecha = new Element('actividades_fecha');
     $actividades_fecha->setLabel('Fecha de Inicio');
     $actividades_fecha->setAttributes(array('placeholder' => 'Fecha de Inicio', 'id' => 'actividades_fecha', 'class' => 'form-control'));
     $actividades_fecha_fin = new Element('actividades_fecha_fin');
     $actividades_fecha_fin->setLabel('Fecha de Finalización');
     $actividades_fecha_fin->setAttributes(array('placeholder' => 'Fecha de Finalización', 'id' => 'actividades_fecha_fin', 'class' => 'form-control'));
     $guardar = new Element\Button('guardar');
     $guardar->setAttributes(array('class' => 'btn btn-success mr5', 'type' => 'submit', 'id' => 'guardar'));
     $guardar->setOptions(array('label' => '<i class="glyphicon glyphicon-floppy-disk"></i>', 'label_options' => array('disable_html_escape' => true)));
     $this->add($actividades_id);
     $this->add($actividades_nombre);
     $this->add($actividades_fecha);
     $this->add($actividades_estado);
     $this->add($actividades_responsable);
     $this->add($actividades_area);
     $this->add($actividades_reporta);
     $this->add($actividades_fecha_fin);
     $this->add($guardar);
 }
开发者ID:Crisstthian,项目名称:Reminder,代码行数:49,代码来源:ActividadesForm.php

示例11: prepare

 public function prepare()
 {
     $password = new Element('password');
     $password->setLabel($this->translate('Password'));
     $password->setAttributes(['type' => 'password', 'id' => 'password', 'icon' => 'lock', 'class' => 'form-control']);
     $confirmPassword = new Element('confirm-password');
     $confirmPassword->setLabel($this->translate('Confirm Password'));
     $confirmPassword->setAttributes(['type' => 'password', 'icon' => 'lock', 'class' => 'form-control']);
     $send = new Element('send');
     $send->setValue($this->translate('Update password'));
     $send->setAttributes(['type' => 'submit', 'class' => 'btn btn-success']);
     $this->add($password);
     $this->add($confirmPassword);
     $this->add($send);
     parent::prepare();
 }
开发者ID:netsensia,项目名称:zf2-foundation,代码行数:16,代码来源:UpdatePasswordForm.php

示例12: __construct

 /**
  * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
  */
 public function __construct($entityManager)
 {
     parent::__construct('contatoSearchForm');
     $this->setAttribute('method', 'post');
     $this->setAttribute('id', 'contatoSearch');
     $this->setAttribute('class', 'form-inline');
     $this->setEntityManager($entityManager);
     $nome = new Element('likeField');
     $nome->setAttributes(array('name' => 'likeField', 'id' => 'likeField', 'type' => 'text', 'data-ng-model' => 'list.search'));
     $nome->setLabel('Palavra Chave ');
     $this->add($nome);
     $submit = new Element('clear');
     $submit->setValue('Limpar');
     $submit->setAttributes(array('type' => 'button', 'data-ng-click' => 'list.clearSearch()'));
     $this->add($submit);
 }
开发者ID:mauriciopiber,项目名称:sandbox-contact,代码行数:19,代码来源:ContatoSearchForm.php

示例13: prepare

 public function prepare()
 {
     $name = new Element('email');
     $name->setLabel('Your email');
     $name->setAttributes(['type' => 'text', 'icon' => 'envelope', 'class' => 'form-control']);
     $message = new Element('message');
     $message->setLabel($this->translate('Your question or feedback'));
     $message->setAttributes(['type' => 'textarea', 'class' => 'form-control']);
     $send = new Element('send');
     $send->setValue('Submit');
     $send->setAttributes(['type' => 'submit', 'class' => 'btn btn-default']);
     $this->add($name);
     $this->add($message);
     $this->addCaptcha();
     $this->add($send);
     parent::prepare();
 }
开发者ID:netsensia,项目名称:zf2-foundation,代码行数:17,代码来源:ContactForm.php

示例14: __construct

 public function __construct()
 {
     $inputFilterForm = new InputFilter();
     parent::__construct('form');
     $this->setInputFilter($inputFilterForm);
     $name = new Element('name');
     $name->setLabel('Your name');
     $name->setAttributes(array('type' => 'text'));
     $inputFilterForm->add(array('name' => 'name', 'required' => true, 'validators' => array(array('name' => 'Zend\\Validator\\NotEmpty'))));
     $email = new Element('email');
     $email->setLabel('Your email');
     $email->setAttributes(array('type' => 'text'));
     $inputFilterForm->add(array('name' => 'email', 'required' => true, 'validators' => array(array('name' => 'Zend\\Validator\\EmailAddress'))));
     $photo = new Element('photo');
     $photo->setLabel('Your photo');
     $photo->setAttributes(array('type' => 'file'));
     $inputFilterFieldset = new InputFilter();
     // ---------- FieldsetsElements ----------
     $username = new Element('username');
     $username->setLabel('Your username');
     $username->setAttributes(array('type' => 'text'));
     $inputFilterFieldset->add(array('name' => 'username', 'required' => true, 'validators' => array(array('name' => 'Zend\\Validator\\NotEmpty'))));
     $inputFilterFieldset->add(array('name' => 'password', 'required' => true, 'validators' => array(array('name' => 'Zend\\Validator\\NotEmpty'))));
     $password = new Element('password');
     $password->setLabel('Your password');
     $password->setAttributes(array('type' => 'password'));
     $vpassword = new Element('verify_password');
     $vpassword->setLabel('Verify your password');
     $vpassword->setAttributes(array('type' => 'password'));
     // ---------- FieldsetsElements ----------
     $fieldsetCredential = new Fieldset('id_credential');
     $fieldsetCredential->add($username);
     $fieldsetCredential->add($password);
     $fieldsetCredential->add($vpassword);
     $inputFilterForm->add($inputFilterFieldset, 'id_credential');
     $submit = new Element('submit');
     $submit->setAttributes(array('value' => 'ENVIAR', 'type' => 'submit'));
     // ---------- Formulario ----------
     $this->setHydrator(new \Zend\Stdlib\Hydrator\ClassMethods());
     $this->add($name);
     $this->add($email);
     $this->add($photo);
     $this->add($fieldsetCredential);
     $this->add($submit);
 }
开发者ID:danielventura90,项目名称:calz,代码行数:45,代码来源:FormManager.php

示例15: prepare

 public function prepare()
 {
     $email = new Element('login-email');
     $email->setLabel($this->translate('Email'));
     $email->setAttributes(['id' => 'login-email-standard', 'type' => 'text', 'icon' => 'envelope', 'class' => 'form-control']);
     $password = new Element('login-password');
     $password->setLabel($this->translate('Password'));
     $password->setAttributes(['type' => 'password', 'id' => 'login-password-standard', 'icon' => 'lock', 'class' => 'form-control']);
     $rememberMe = new Checkbox('rememberme');
     $rememberMe->setLabel($this->translate('Remember me'));
     $send = new Element('send');
     $send->setValue('Login');
     $send->setAttributes(['type' => 'submit', 'class' => 'btn btn-default']);
     $this->add($email);
     $this->add($password);
     $this->add($rememberMe);
     $this->add($send);
     parent::prepare();
 }
开发者ID:netsensia,项目名称:zf2-foundation,代码行数:19,代码来源:LoginForm.php


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