public function button_check_box()
{
return _class('html')->button_check_box('input_name', ['k1' => 'key1', 'k2' => 'key2']);
}
public function button_check_box($name, $values = [], $selected = '')
{
if (is_array($name)) {
$extra = (array) $extra + $name;
$name = $extra['name'];
}
! is_array($extra) && $extra = [];
$label_extra = $extra['label_extra'];
$extra = [
'name' => $name,
'values' => $values,
'selected' => $selected,
'use_stpl' => false,
'label_extra' => [
'class' => ($label_extra['class'] ?: $this->CLASS_LABEL_BTN_CHECKBOX),
],
] + $extra;
$label_right = $extra['label_right'] ? '<label class="text"> <small>' . $extra['desc'] . '</small></label>' : '';
return '<div class="btn-group" data-toggle="buttons">' . $this->check_box($extra) . $label_right . '</div>';
}