本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例8: passwordField
/**
* @param Field $field
* @return string
*/
public function passwordField(Field $field)
{
return $this->builder->password($field->name, $field->getAttributes());
}
示例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));
}