PHP Класс yii\widgets\InputWidget

An input widget can be associated with a data model and an attribute, or a name and a value. If the former, the name and the value will be generated automatically. Classes extending from this widget can be used in an [[\yii\widgets\ActiveForm|ActiveForm]] using the [[\yii\widgets\ActiveField::widget()|widget()]] method, for example like this: php field($model, 'from_date')->widget('WidgetClassName', [ configure additional widget properties here ]) ?> For more details and usage information on InputWidget, see the guide article on forms.
С версии: 2.0
Автор: Qiang Xue ([email protected])
Наследование: extends yii\base\Widget
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$attribute the model attribute that this widget is associated with.
$model the data model that this widget is associated with.
$name the input name. This must be set if [[model]] and [[attribute]] are not set.
$options the HTML attributes for the input tag.
$value the input value.

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

Метод Описание
init ( ) Initializes the widget.

Защищенные методы

Метод Описание
hasModel ( ) : boolean

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

hasModel() защищенный Метод

protected hasModel ( ) : boolean
Результат boolean whether this widget is associated with a data model.

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

If you override this method, make sure you call the parent implementation first.
public init ( )

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

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

the model attribute that this widget is associated with.
public $attribute

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

the data model that this widget is associated with.
public $model

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

the input name. This must be set if [[model]] and [[attribute]] are not set.
public $name

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

the HTML attributes for the input tag.
См. также: yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
public $options

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

the input value.
public $value