Swat/SwatButton.php
protected function getCSSClassNames()
    {
        $classes = array('swat-button');

        $form = $this->getFirstAncestor('SwatForm');
        $primary =
            $form !== null && $form->getFirstDescendant('SwatButton') === $this;

        if ($primary) {
            $classes[] = 'swat-primary';
        }

        if ($this->stock_class !== null) {
            $classes[] = $this->stock_class;
        }

        $classes = array_merge($classes, parent::getCSSClassNames());

        return $classes;
    }
protected function getCSSClassNames()
    {
        $classes = array('swat-button');

        $form = $this->getFirstAncestor('SwatForm');
        $primary =
            $form !== null && $form->getFirstDescendant('SwatButton') === $this;

        if ($primary) {
            $classes[] = 'swat-primary';
        }

        if ($this->stock_class !== null) {
            $classes[] = $this->stock_class;
        }

        $classes = array_merge($classes, parent::getCSSClassNames());

        return $classes;
    }
protected function getCSSClassNames ( ) { $ classes = array ( 'swat-button' ) ; $ form = $ this -> getFirstAncestor ( 'SwatForm' ) ; $ primary = $ form !== null && $ form -> getFirstDescendant ( 'SwatButton' ) === $ this ; if ( $ primary ) { $ classes [ ] = 'swat-primary' ; } if ( $ this -> stock_class !== null ) { $ classes [ ] = $ this -> stock_class ; } $ classes = array_merge ( $ classes , parent :: getCSSClassNames ( ) ) ; return $ classes ; }
Gets the array of CSS classes that are applied to this button

@return array the array of CSS classes that are applied to this button.
Gets the array of CSS classes that are applied to this button