本文整理汇总了PHP中Illuminate\Html\FormBuilder::textarea方法的典型用法代码示例。如果您正苦于以下问题:PHP FormBuilder::textarea方法的具体用法?PHP FormBuilder::textarea怎么用?PHP FormBuilder::textarea使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Html\FormBuilder
的用法示例。
在下文中一共展示了FormBuilder::textarea方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: textarea
public function textarea($name, $value = null, $options = array())
{
if (strpos(@$options['class'], 'form-control') === false) {
@($options['class'] .= ' form-control');
}
return parent::textarea($name, $value, $options);
}
示例2: textarea
/**
* Create a Textarea field.
*
*
* @param string $name
* @param string $value
* @param array $options
* @param string $label
* @return string
*/
public function textarea($name, $value = null, $options = array(), $label = '')
{
if (!self::$is_bootstrap || in_array($name, self::$excluded)) {
return parent::input($type, $name, $value, $options);
}
$label_text = $label == '' ? $this->transformKey($name) : $label;
$options = $this->appendClassToOptions('form-control', $options);
// Call the parent input method so that Laravel can handle
// the rest of the input set up.
return $this->openGroup($name, $label_text) . parent::textarea($name, $value, $options) . $this->closeGroup($name);
}
示例3: textarea
/**
* Create a textarea input.
*
* @param string $name
* @param string $value
* @param array $options
*
* @return string
*/
public function textarea($name, $value = null, $options = [])
{
$this->addErrorClass($name, $options);
$tags['input'] = parent::textarea($name, $value, $options);
$tags['error'] = $this->getErrorTag($name);
return $this->buildTags($tags);
}
示例4: textarea
/**
* {@inheritdoc}
*/
public function textarea($name, $value = null, $options = [])
{
$options = array_merge($options, $this->parsley->getFieldRules($name));
return parent::textarea($name, $value, $options);
}
示例5: textarea
/**
* {@inheritdoc}
* @param string $name The name of the text area
* @param string|null $value The default value
* @param array $attributes The attributes of the text area
* @return string
*/
public function textarea($name, $value = null, $attributes = array())
{
$attributes['class'] = isset($attributes['class']) ? self::FORM_CONTROL . ' ' . $attributes['class'] : self::FORM_CONTROL;
return parent::textarea($name, $value, $attributes);
}
示例6: textarea
/**
* Create a textarea input field.
*
* @param string $name
* @param string $value
* @param array $options
* @return string
*/
public function textarea($name, $value = null, $options = array())
{
$options = $this->addErrorClass($name, $options);
$options = $this->checkRequired($name, $options);
return parent::textarea($name, $value, $options);
}
示例7: textarea
/**
* Generate a textarea field
*
* @param $name
* @param string $value
* @param array $options
*
* @return string
*/
public function textarea($name, $value = '', $options = [])
{
return $this->formBuilder->textarea($name, $value, $options);
}
示例8: textarea
/**
* Create a textarea input field.
*
* @param string $name
* @param string $value
* @param array $options
* @return string
*/
public function textarea($name, $value = null, $options = array())
{
return parent::textarea($name, $value, $this->addClass($options, static::TEXT_INPUT_CLASS));
}
示例9: plainTextarea
/**
* Create a plain textarea input field.
*
* @param string $name
* @param string $value
* @param array $options
*
* @return string
*/
public function plainTextarea($name, $value = null, $options = [])
{
return parent::textarea($name, $value, $options);
}
示例10: textarea
/**
* Create a textarea input field.
*
* @param string $name
* @param string $value
* @param array $options
* @return string
*/
public function textarea($name, $value = null, $options = array())
{
$this->appendReadOnly($options);
return parent::textarea($name, $value, $options);
}
示例11: textarea
/**
* Create a textarea input field.
*
* @param string $name
* @param string $value
* @param array $options
* @return \Illuminate\Support\HtmlString
*/
public function textarea($name, $value = null, $options = [])
{
return new HtmlString(parent::textarea($name, $value, $options));
}
示例12: textarea
/**
* @see Illuminate\Html\FormBuilder
*/
public function textarea($name, $value = null, $options = [])
{
$options = $this->laravelToJquery($name) + $options;
return parent::textarea($name, $value, $options);
}
示例13: textarea
/**
* @see Illuminate\Html\FormBuilder
*/
public function textarea($name, $value = null, $options = [])
{
$options = $this->converter->convert(Helper::getFormAttribute($name)) + $options;
return parent::textarea($name, $value, $options);
}
示例14: textarea
/**
* Create a HTML textarea input element.
*
* @param string $name
* @param string $label
* @param null $value
* @param array $attributes
* @return string
*/
public function textarea($name, $label = '', $value = null, $attributes = array())
{
$value = $this->calculateValue($name, $value);
$attributes = $this->setAttributes($name, $attributes);
if (!isset($attributes['rows'])) {
$attributes['rows'] = 4;
}
$field = parent::textarea($name, $value, $attributes);
return $this->buildWrapper($field, $name, $label);
}
示例15: textareaField
/**
* @param Field $field
* @return string
*/
public function textareaField(Field $field)
{
return $this->builder->textarea($field->name, $field->value, $field->getAttributes());
}