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


PHP FormBuilder::password方法代码示例

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


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

示例1: button

 public function button($value = null, $options = array())
 {
     if (strpos(@$options['class'], 'btn') === false) {
         @($options['class'] .= ' btn btn-default');
     }
     return parent::password($value, $options);
 }
开发者ID:rtconner,项目名称:laravel-plusplus,代码行数:7,代码来源:BootstrapFormBuilder.php

示例2: password

 /**
  * Create a password input field.
  *
  * @param  string  $name
  * @param  array   $options
  *
  * @return string
  */
 public function password($name, $options = [])
 {
     $this->addErrorClass($name, $options);
     $tags['input'] = parent::password($name, $options);
     $tags['error'] = $this->getErrorTag($name);
     return $this->buildTags($tags);
 }
开发者ID:stolz,项目名称:laravel-form-builder,代码行数:15,代码来源:Foundation.php

示例3: input

 /**
  * Create the input group for an element with the correct classes for errors.
  *
  * @param  string $type
  * @param  string $name
  * @param  string $value
  * @param  array $options
  * @return string
  */
 public function input($type, $name, $value = null, $options = [])
 {
     $label = array_get($options, 'label', $this->translationDomain ? $this->translationDomain . '.' . $name : $name);
     unset($options['label']);
     $options = $this->getFieldOptions($options);
     $wrapperOptions = ['class' => $this->getRightColumnClass()];
     $description = '';
     if (isset($options['description'])) {
         $description = '<span class="help-block">' . $options['description'] . '</span>';
         unset($options['description']);
     }
     $prepend = '';
     if (isset($options['prepend'])) {
         $prepend = '<span class="input-group-addon">' . $options['prepend'] . '</span>';
         unset($options['prepend']);
         $wrapperOptions['class'] = $wrapperOptions['class'] . ' input-group';
     }
     $append = '';
     if (isset($options['append'])) {
         $append = '<span class="input-group-addon">' . $options['append'] . '</span>';
         unset($options['append']);
         $wrapperOptions['class'] = $wrapperOptions['class'] . ' input-group';
     }
     $inputElement = $type == 'password' ? $this->form->password($name, $options) : $this->form->{$type}($name, $value, $options);
     $groupElement = '<div ' . $this->html->attributes($wrapperOptions) . '>' . $prepend . $inputElement . $append . '</div>';
     $groupElement .= $this->getFieldError($name);
     return $this->getFormGroup($name, $label, $description . $groupElement);
 }
开发者ID:Junyue,项目名称:zidisha2,代码行数:37,代码来源:BootstrapFormBuilder.php

示例4: input

 /**
  * Create the input group for an element with the correct classes for errors.
  *
  * @param  string  $type
  * @param  string  $name
  * @param  string  $label
  * @param  string  $value
  * @param  array   $options
  * @return string
  */
 public function input($type, $name, $label = null, $value = null, $options = array())
 {
     $label = $this->getLabelTitle($label, $name);
     $options = $this->getFieldOptions($options);
     $wrapperOptions = array('class' => $this->getRightColumnClass());
     $inputElement = $type == 'password' ? $this->form->password($name, $options) : $this->form->{$type}($name, $value, $options);
     $groupElement = '<div ' . $this->html->attributes($wrapperOptions) . '>' . $inputElement . $this->getFieldError($name) . '</div>';
     return $this->getFormGroup($name, $label, $groupElement);
 }
开发者ID:Javier-Rotelli,项目名称:bootstrap-form,代码行数:19,代码来源:BootstrapForm.php

示例5: password

 /**
  * Create a password input field.
  *
  * @param string $name
  * @param array $options
  * @return string 
  * @static 
  */
 public static function password($name, $options = array())
 {
     return \Illuminate\Html\FormBuilder::password($name, $options);
 }
开发者ID:nmkr,项目名称:basic-starter,代码行数:12,代码来源:_ide_helper.php

示例6: password

 /**
  * Create a HTML password input element.
  *
  * @param  string  $name
  * @param  string  $label
  * @param  array   $attributes
  * @return string
  */
 public function password($name, $label = '', $attributes = array())
 {
     $attributes = $this->setAttributes($name, $attributes);
     $field = parent::password($name, $attributes);
     return $this->buildWrapper($field, $name, $label);
 }
开发者ID:jarnstedt,项目名称:former,代码行数:14,代码来源:Former.php

示例7: password

 /**
  * {@inheritdoc}
  * @param string $name       The name of the password input
  * @param array  $attributes The attributes of the input
  * @return string
  */
 public function password($name, $attributes = array())
 {
     $attributes['class'] = isset($attributes['class']) ? self::FORM_CONTROL . ' ' . $attributes['class'] : self::FORM_CONTROL;
     return parent::password($name, $attributes);
 }
开发者ID:olax,项目名称:epetitions,代码行数:11,代码来源:Form.php

示例8: passwordField

 /**
  * @param Field $field
  * @return string
  */
 public function passwordField(Field $field)
 {
     return $this->builder->password($field->name, $field->getAttributes());
 }
开发者ID:iyoworks,项目名称:form-builder,代码行数:8,代码来源:LaravelFormRenderer.php

示例9: password

 /**
  * Create a password input field.
  *
  * @param  string  $name
  * @param  array   $options
  * @return string
  */
 public function password($name, $options = array())
 {
     return parent::password($name, $this->addClass($options, static::TEXT_INPUT_CLASS));
 }
开发者ID:wingsline,项目名称:inuitcss,代码行数:11,代码来源:FormBuilder.php


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