PHP Класс macgyer\yii2materializecss\widgets\form\ActiveField

См. также: http://www.yiiframework.com/doc-2.0/yii-widgets-activefield.html
Автор: Christoph Erdmann ([email protected])
Наследование: extends yii\widgets\ActiveField
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$errorOptions the default options for the error tags. The parameter passed to yii\widgets\ActiveField::error()-detail) will be merged with this property when rendering the error tag. The following special options are recognized: - tag: the tag name of the container element. Defaults to "div". - encode: whether to encode the error output. Defaults to true. If you set a custom id for the error element, you may need to adjust the yii\widgets\ActiveField::$selectors accordingly.
$hintOptions the default options for the hint tags. The parameter passed to yii\widgets\ActiveField::hint()-detail) will be merged with this property when rendering the hint tag. The following special options are recognized: - tag: the tag name of the container element. Defaults to "div".
$icon the options for the optional prefix icon. To specify an icon you can use the following parameters php [ 'name' => 'name of the icon', // required 'options' => 'the HTML attributes for the img', // optional ]
$inputOptions the default options for the input tags. The parameter passed to individual input methods (e.g. textInput()-detail)) will be merged with this property when rendering the input tag. If you set a custom id for the input element, you may need to adjust the $selectors accordingly.
$labelOptions the default options for the label tags. The parameter passed to label()-detail) will be merged with this property when rendering the label tag.
$options the HTML attributes (name-value pairs) for the field container tag. The values will be HTML-encoded using Html::encode()-detail). If a value is null, the corresponding attribute will not be rendered. The following special options are recognized: - tag: the tag name of the container element. Defaults to "div". If you set a custom id for the container element, you may need to adjust the $selectors accordingly.
$template the template that is used to arrange the label, the input field, the error message and the hint text. The following tokens will be replaced when ActiveField::render is called: {label}, {input}, {error} and {hint}.

Открытые методы

Метод Описание
colorInput ( array $options = [] ) : ActiveField Renders a color input.
dateInput ( array $options = [] ) : ActiveField Renders a date input.
datetimeInput ( array $options = [] ) : ActiveField Renders a datetime input.
datetimeLocalInput ( array $options = [] ) : ActiveField Renders a datetime local input.
emailInput ( array $options = [] ) : ActiveField Renders an email input.
icon ( ) : ActiveField Renders an icon.
init ( ) Initializes the widget.
monthInput ( array $options = [] ) : ActiveField Renders a month input.
numberInput ( array $options = [] ) : ActiveField Renders a number input.
rangeInput ( array $options = [] ) : ActiveField Renders a range input.
render ( string | callable $content = null ) : string Renders the whole field.
searchInput ( array $options = [] ) : ActiveField Renders a search input.
telInput ( array $options = [] ) : ActiveField Renders a phone input.
textarea ( array $options = [] ) : ActiveField Renders a textarea.
timeInput ( array $options = [] ) : ActiveField Renders a time input.
urlInput ( array $options = [] ) : ActiveField Renders an URL input.
weekInput ( array $options = [] ) : ActiveField Renders a week input.

Описание методов

colorInput() публичный Метод

Renders a color input.
public colorInput ( array $options = [] ) : ActiveField
$options array
Результат ActiveField

dateInput() публичный Метод

Renders a date input.
public dateInput ( array $options = [] ) : ActiveField
$options array
Результат ActiveField

datetimeInput() публичный Метод

Renders a datetime input.
public datetimeInput ( array $options = [] ) : ActiveField
$options array
Результат ActiveField

datetimeLocalInput() публичный Метод

Renders a datetime local input.
public datetimeLocalInput ( array $options = [] ) : ActiveField
$options array
Результат ActiveField

emailInput() публичный Метод

Renders an email input.
public emailInput ( array $options = [] ) : ActiveField
$options array
Результат ActiveField

icon() публичный Метод

Renders an icon.
public icon ( ) : ActiveField
Результат ActiveField

init() публичный Метод

Initializes the widget.
public init ( )

monthInput() публичный Метод

Renders a month input.
public monthInput ( array $options = [] ) : ActiveField
$options array
Результат ActiveField

numberInput() публичный Метод

Renders a number input.
public numberInput ( array $options = [] ) : ActiveField
$options array
Результат ActiveField

rangeInput() публичный Метод

Renders a range input.
public rangeInput ( array $options = [] ) : ActiveField
$options array
Результат ActiveField

render() публичный Метод

This method will generate the label, error tag, input tag and hint tag (if any), and assemble them into HTML according to [[template]].
public render ( string | callable $content = null ) : string
$content string | callable the content within the field container. If null (not set), the default methods will be called to generate the label, error tag and input tag, and use them as the content. If a callable, it will be called to generate the content. The signature of the callable should be: ```php function ($field) { return $html; } ```
Результат string the rendering result

searchInput() публичный Метод

Renders a search input.
public searchInput ( array $options = [] ) : ActiveField
$options array
Результат ActiveField

telInput() публичный Метод

Renders a phone input.
public telInput ( array $options = [] ) : ActiveField
$options array
Результат ActiveField

textarea() публичный Метод

Renders a textarea.
public textarea ( array $options = [] ) : ActiveField
$options array
Результат ActiveField

timeInput() публичный Метод

Renders a time input.
public timeInput ( array $options = [] ) : ActiveField
$options array
Результат ActiveField

urlInput() публичный Метод

Renders an URL input.
public urlInput ( array $options = [] ) : ActiveField
$options array
Результат ActiveField

weekInput() публичный Метод

Renders a week input.
public weekInput ( array $options = [] ) : ActiveField
$options array
Результат ActiveField

Описание свойств

$errorOptions публичное свойство

the default options for the error tags. The parameter passed to yii\widgets\ActiveField::error()-detail) will be merged with this property when rendering the error tag. The following special options are recognized: - tag: the tag name of the container element. Defaults to "div". - encode: whether to encode the error output. Defaults to true. If you set a custom id for the error element, you may need to adjust the yii\widgets\ActiveField::$selectors accordingly.
См. также: [\yii\helpers\Html::renderTagAttributes()](http://www.yiiframework.com/doc-2.0/yii-helpers-basehtml.html#renderTagAttributes()-detail) for details on how attributes are being rendered.
public $errorOptions

$hintOptions публичное свойство

the default options for the hint tags. The parameter passed to yii\widgets\ActiveField::hint()-detail) will be merged with this property when rendering the hint tag. The following special options are recognized: - tag: the tag name of the container element. Defaults to "div".
См. также: [\yii\helpers\Html::renderTagAttributes()](http://www.yiiframework.com/doc-2.0/yii-helpers-basehtml.html#renderTagAttributes()-detail) for details on how attributes are being rendered.
public $hintOptions

$icon публичное свойство

the options for the optional prefix icon. To specify an icon you can use the following parameters php [ 'name' => 'name of the icon', // required 'options' => 'the HTML attributes for the img', // optional ]
public $icon

$inputOptions публичное свойство

the default options for the input tags. The parameter passed to individual input methods (e.g. textInput()-detail)) will be merged with this property when rendering the input tag. If you set a custom id for the input element, you may need to adjust the $selectors accordingly.
См. также: [\yii\helpers\Html::renderTagAttributes()](http://www.yiiframework.com/doc-2.0/yii-helpers-basehtml.html#renderTagAttributes()-detail) for details on how attributes are being rendered.
public $inputOptions

$labelOptions публичное свойство

the default options for the label tags. The parameter passed to label()-detail) will be merged with this property when rendering the label tag.
См. также: [\yii\helpers\Html::renderTagAttributes()](http://www.yiiframework.com/doc-2.0/yii-helpers-basehtml.html#renderTagAttributes()-detail) for details on how attributes are being rendered.
public $labelOptions

$options публичное свойство

the HTML attributes (name-value pairs) for the field container tag. The values will be HTML-encoded using Html::encode()-detail). If a value is null, the corresponding attribute will not be rendered. The following special options are recognized: - tag: the tag name of the container element. Defaults to "div". If you set a custom id for the container element, you may need to adjust the $selectors accordingly.
См. также: [\yii\helpers\Html::renderTagAttributes()](http://www.yiiframework.com/doc-2.0/yii-helpers-basehtml.html#renderTagAttributes()-detail) for details on how attributes are being rendered.
public $options

$template публичное свойство

the template that is used to arrange the label, the input field, the error message and the hint text. The following tokens will be replaced when ActiveField::render is called: {label}, {input}, {error} and {hint}.
public $template