src/Netzmacht/Bootstrap/Buttons/ContentElement/ButtonsElement.php
public function addButtonStyle($child)
    {
        if ($child instanceof Group || $child instanceof Toolbar) {
            $child->eachChild(array($this, 'addButtonStyle'));
        } else {
            $class = $child->getAttribute('class');
            $class = array_filter($class, function ($item) {
                return strpos($item, 'btn-') !== false;
            });

            if (!$class && $this->bootstrap_buttonStyle) {
                $child->addClass($this->bootstrap_buttonStyle);
            }
        }
    }
public function addButtonStyle($child)
    {
        if ($child instanceof Group || $child instanceof Toolbar) {
            $child->eachChild(array($this, 'addButtonStyle'));
        } else {
            $class = $child->getAttribute('class');
            $class = array_filter($class, function ($item) {
                return strpos($item, 'btn-') !== false;
            });

            if (!$class && $this->bootstrap_buttonStyle) {
                $child->addClass($this->bootstrap_buttonStyle);
            }
        }
    }
public function addButtonStyle ( $ child ) { if ( $ child instanceof Group || $ child instanceof Toolbar ) { $ child -> eachChild ( array ( $ this , 'addButtonStyle' ) ) ; } else { $ class = $ child -> getAttribute ( 'class' ) ; $ class = array_filter ( $ class , function ( $ item ) { return strpos ( $ item , 'btn-' ) !== false ; } ) ; if ( ! $ class && $ this -> bootstrap_buttonStyle ) { $ child -> addClass ( $ this -> bootstrap_buttonStyle ) ; } } }
Add button style.

@param mixed $child Current child.

@return void
Add button style .