/** * Removes the `btn-*` class names and adds the `btn-group` class. * * @inheritdoc */ protected function render_class(array $class_names) { return parent::render_class(array_filter($class_names, function ($class_name) { return strpos($class_name, 'btn-') === false; }, ARRAY_FILTER_USE_KEY) + ['btn-group' => true]); }
protected function render_class(array $class_names) { return parent::render_class($class_names + ['dropdown-menu' => true]); }
/** * Removes the `btn-primary`, `btn-danger`, `btn-success` and `btn-info` class names and adds * the `btn-group` class. */ protected function render_class(array $class_names) { return parent::render_class(['btn-primary' => false, 'btn-danger' => false, 'btn-success' => false, 'btn-info' => false] + $class_names + ['btn-group' => true]); }