Class yii\jui\InputWidget

Inheritanceyii\jui\InputWidget » yii\jui\Widget » yii\base\Widget
Subclassesyii\jui\AutoComplete, yii\jui\DatePicker, yii\jui\SliderInput, yii\jui\Spinner
Available since version2.0
Source Code https://github.com/yiisoft/yii2-jui/blob/master/InputWidget.php

InputWidget is the base class for all jQuery UI input widgets.

Classes extending from this widget can be used in an yii\widgets\ActiveForm using the yii\widgets\ActiveField::widget() method, for example like this:

<?= $form->field($model, 'from_date')->widget('WidgetClassName', [
    // configure additional widget properties here
]) ?>

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$attribute string The model attribute that this widget is associated with. yii\jui\InputWidget
$clientEvents array The event handlers for the underlying jQuery UI widget. yii\jui\Widget
$clientOptions array The options for the underlying jQuery UI widget. yii\jui\Widget
$model \yii\base\Model The data model that this widget is associated with. yii\jui\InputWidget
$name string The input name. yii\jui\InputWidget
$options array The HTML attributes for the widget container tag. yii\jui\Widget
$value string The input value. yii\jui\InputWidget

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$clientEventMap array Event names mapped to what should be specified in `. yii\jui\Widget

Public Methods

Hide inherited methods

MethodDescriptionDefined By
init() Initializes the widget. yii\jui\InputWidget

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
hasModel() yii\jui\InputWidget
registerClientEvents() Registers a specific jQuery UI widget events yii\jui\Widget
registerClientOptions() Registers a specific jQuery UI widget options yii\jui\Widget
registerWidget() Registers a specific jQuery UI widget asset bundle, initializes it with client options and registers related events yii\jui\Widget

Property Details

$attribute public property

The model attribute that this widget is associated with.

public string $attribute null
$model public property

The data model that this widget is associated with.

public \yii\base\Model $model null
$name public property

The input name. This must be set if $model and $attribute are not set.

public string $name null
$value public property

The input value.

public string $value null

Method Details

hasModel() protected method

protected boolean hasModel ( )
return boolean

Whether this widget is associated with a data model.

init() public method

Initializes the widget.

If you override this method, make sure you call the parent implementation first.

public void init ( )