1 | <?php |
||
27 | class ButtonDropdown extends Widget |
||
28 | { |
||
29 | /** |
||
30 | * @var string the button label |
||
31 | */ |
||
32 | public $label = 'Button'; |
||
33 | /** |
||
34 | * @var array the HTML attributes for the container tag. The following special options are recognized: |
||
35 | * |
||
36 | * - tag: string, defaults to "div", the name of the container tag. |
||
37 | * |
||
38 | * @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered. |
||
39 | * @since 2.0.1 |
||
40 | */ |
||
41 | public $containerOptions = []; |
||
42 | /** |
||
43 | * @var array the HTML attributes of the button. |
||
44 | * @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered. |
||
45 | */ |
||
46 | public $options = []; |
||
47 | /** |
||
48 | * @var array the configuration array for [[Dropdown]]. |
||
49 | */ |
||
50 | public $dropdown = []; |
||
51 | /** |
||
52 | * @var boolean whether to display a group of split-styled button group. |
||
53 | */ |
||
54 | public $split = false; |
||
55 | /** |
||
56 | * @var string the tag to use to render the button |
||
57 | */ |
||
58 | public $tagName = 'button'; |
||
59 | /** |
||
60 | * @var boolean whether the label should be HTML-encoded. |
||
61 | */ |
||
62 | public $encodeLabel = true; |
||
63 | /** |
||
64 | * @var boolean include container wrap (default btn-group) |
||
65 | */ |
||
66 | public $includeContainer = true; |
||
67 | |||
68 | |||
69 | /** |
||
70 | * Renders the widget. |
||
71 | */ |
||
72 | public function run() |
||
92 | |||
93 | /** |
||
94 | * Generates the button dropdown. |
||
95 | * @return string the rendering result. |
||
96 | */ |
||
97 | protected function renderButton() |
||
134 | |||
135 | /** |
||
136 | * Generates the dropdown menu. |
||
137 | * @return string the rendering result. |
||
138 | */ |
||
139 | protected function renderDropdown() |
||
147 | |||
148 | } |
||
149 |
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: