PHP Class macgyer\yii2materializecss\widgets\form\ActiveField

See also: http://www.yiiframework.com/doc-2.0/yii-widgets-activefield.html
Author: Christoph Erdmann ([email protected])
Inheritance: extends yii\widgets\ActiveField
Afficher le fichier Open project: macgyer/yii2-materializecss

Méthodes publiques

Свойство Type Description
$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}.

Méthodes publiques

Méthode Description
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.

Method Details

colorInput() public méthode

Renders a color input.
public colorInput ( array $options = [] ) : ActiveField
$options array
Résultat ActiveField

dateInput() public méthode

Renders a date input.
public dateInput ( array $options = [] ) : ActiveField
$options array
Résultat ActiveField

datetimeInput() public méthode

Renders a datetime input.
public datetimeInput ( array $options = [] ) : ActiveField
$options array
Résultat ActiveField

datetimeLocalInput() public méthode

Renders a datetime local input.
public datetimeLocalInput ( array $options = [] ) : ActiveField
$options array
Résultat ActiveField

emailInput() public méthode

Renders an email input.
public emailInput ( array $options = [] ) : ActiveField
$options array
Résultat ActiveField

icon() public méthode

Renders an icon.
public icon ( ) : ActiveField
Résultat ActiveField

init() public méthode

Initializes the widget.
public init ( )

monthInput() public méthode

Renders a month input.
public monthInput ( array $options = [] ) : ActiveField
$options array
Résultat ActiveField

numberInput() public méthode

Renders a number input.
public numberInput ( array $options = [] ) : ActiveField
$options array
Résultat ActiveField

rangeInput() public méthode

Renders a range input.
public rangeInput ( array $options = [] ) : ActiveField
$options array
Résultat ActiveField

render() public méthode

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; } ```
Résultat string the rendering result

searchInput() public méthode

Renders a search input.
public searchInput ( array $options = [] ) : ActiveField
$options array
Résultat ActiveField

telInput() public méthode

Renders a phone input.
public telInput ( array $options = [] ) : ActiveField
$options array
Résultat ActiveField

textarea() public méthode

Renders a textarea.
public textarea ( array $options = [] ) : ActiveField
$options array
Résultat ActiveField

timeInput() public méthode

Renders a time input.
public timeInput ( array $options = [] ) : ActiveField
$options array
Résultat ActiveField

urlInput() public méthode

Renders an URL input.
public urlInput ( array $options = [] ) : ActiveField
$options array
Résultat ActiveField

weekInput() public méthode

Renders a week input.
public weekInput ( array $options = [] ) : ActiveField
$options array
Résultat ActiveField

Property Details

$errorOptions public_oe property

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.
See also: [\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 public_oe property

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".
See also: [\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 public_oe property

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 public_oe property

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.
See also: [\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 public_oe property

the default options for the label tags. The parameter passed to label()-detail) will be merged with this property when rendering the label tag.
See also: [\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 public_oe property

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.
See also: [\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 public_oe property

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