1 | <?php |
||
23 | class TbButtonGroup extends CWidget { |
||
24 | |||
25 | // Toggle options. |
||
26 | const TOGGLE_CHECKBOX = 'checkbox'; |
||
27 | const TOGGLE_RADIO = 'radio'; |
||
28 | |||
29 | /** |
||
30 | * @var string the button callback type. |
||
31 | * @see BootButton::buttonType |
||
32 | */ |
||
33 | public $buttonType = TbButton::BUTTON_BUTTON; |
||
34 | |||
35 | /** |
||
36 | * @var string the button type. |
||
37 | * @see BootButton::type |
||
38 | */ |
||
39 | public $context = TbButton::CTX_DEFAULT; |
||
40 | |||
41 | /** |
||
42 | * @var boolean indicates whether to use justified button groups |
||
43 | */ |
||
44 | public $justified = false; |
||
45 | |||
46 | /** |
||
47 | * @var string the button size. |
||
48 | * @see BootButton::size |
||
49 | */ |
||
50 | public $size; |
||
51 | |||
52 | /** |
||
53 | * @var boolean indicates whether to encode the button labels. |
||
54 | */ |
||
55 | public $encodeLabel = true; |
||
56 | |||
57 | /** |
||
58 | * @var array the HTML attributes for the widget container. |
||
59 | */ |
||
60 | public $htmlOptions = array(); |
||
61 | |||
62 | /** |
||
63 | * @var array the button configuration. |
||
64 | */ |
||
65 | public $buttons = array(); |
||
66 | |||
67 | /** |
||
68 | * @var boolean indicates whether to enable button toggling. |
||
69 | */ |
||
70 | public $toggle; |
||
71 | |||
72 | /** |
||
73 | * @var boolean indicates whether the button group appears vertically stacked. Defaults to 'false'. |
||
74 | */ |
||
75 | public $stacked = false; |
||
76 | |||
77 | /** |
||
78 | * @var boolean indicates whether dropdowns should be dropups instead. Defaults to 'false'. |
||
79 | */ |
||
80 | public $dropup = false; |
||
81 | /** |
||
82 | * @var boolean indicates whether button is disabled or not. Defaults to 'false'. |
||
83 | */ |
||
84 | public $disabled = false; |
||
85 | |||
86 | /** |
||
87 | *### .init() |
||
88 | * |
||
89 | * Initializes the widget. |
||
90 | */ |
||
91 | public function init() { |
||
124 | |||
125 | /** |
||
126 | *### .run() |
||
127 | * |
||
128 | * Runs the widget. |
||
129 | */ |
||
130 | public function run() { |
||
174 | } |
||
175 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.