1 | <?php |
||
25 | class Select2 extends InputWidget |
||
26 | { |
||
27 | |||
28 | /** |
||
29 | * @var string the name of the jQuery plugin |
||
30 | */ |
||
31 | public $pluginName = 'select2'; |
||
32 | /** |
||
33 | * @var array default widget plugin options that user pluginOptions will be merged into |
||
34 | */ |
||
35 | //public $defaultPluginOptions = ['allowClear' => true]; // using our own clear |
||
36 | public $defaultPluginOptions = []; |
||
37 | /** |
||
38 | * @var array the HTML attributes for the input tag. |
||
39 | * @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered. |
||
40 | */ |
||
41 | public $options = ['class' => 'form-control']; |
||
42 | /** |
||
43 | * @var array the items to appear in the drop down list |
||
44 | */ |
||
45 | public $items = null; |
||
46 | |||
47 | |||
48 | /** |
||
49 | * Renders the color picker widget |
||
50 | */ |
||
51 | protected function renderWidget() |
||
62 | |||
63 | /** |
||
64 | * Prepare the input fields for the input |
||
65 | * |
||
66 | * @return void |
||
67 | */ |
||
68 | protected function prepareInput() |
||
76 | |||
77 | /** |
||
78 | * Registers the needed client assets |
||
79 | * |
||
80 | * @return void |
||
81 | */ |
||
82 | public function registerAssets() |
||
92 | |||
93 | } |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: