1 | <?php |
||
35 | class InputWidget extends Widget |
||
36 | { |
||
37 | /** |
||
38 | * @var Model the data model that this widget is associated with. |
||
39 | */ |
||
40 | public $model; |
||
41 | /** |
||
42 | * @var string the model attribute that this widget is associated with. |
||
43 | */ |
||
44 | public $attribute; |
||
45 | /** |
||
46 | * @var string the input name. This must be set if [[model]] and [[attribute]] are not set. |
||
47 | */ |
||
48 | public $name; |
||
49 | /** |
||
50 | * @var string the input value. |
||
51 | */ |
||
52 | public $value; |
||
53 | /** |
||
54 | * @var array the HTML attributes for the input tag. |
||
55 | * @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered. |
||
56 | */ |
||
57 | public $options = []; |
||
58 | |||
59 | |||
60 | /** |
||
61 | * Initializes the widget. |
||
62 | * If you override this method, make sure you call the parent implementation first. |
||
63 | */ |
||
64 | public function init() |
||
74 | |||
75 | /** |
||
76 | * @return boolean whether this widget is associated with a data model. |
||
77 | */ |
||
78 | protected function hasModel() |
||
82 | } |
||
83 |