コード例 #1
0
ファイル: SplitButton.php プロジェクト: brickrouge/brickrouge
 /**
  * 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]);
 }
コード例 #2
0
 protected function render_class(array $class_names)
 {
     return parent::render_class($class_names + ['dropdown-menu' => true]);
 }
コード例 #3
0
 /**
  * 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]);
 }