src/Form/View/Helper/FormButton.php
protected function setElementClass(ElementInterface $element)
    {
        $class = $element->getAttribute('class');
        $type  = $element->getOption('type') ? : self::TYPE_DEFAULT;

        if (!in_array($type, self::TYPES, true)) {
            throw new Exception\DomainException(sprintf(
                '%s requires that the button type is one of "' . implode('", "', self::TYPES) . '"',
                __METHOD__
            ));
        }

        if ($class) {
            $class .= ' ';
        }
        $class .= 'btn btn-' . $type;
        $element->setAttribute('class', $class);
    }
protected function setElementClass(ElementInterface $element)
    {
        $class = $element->getAttribute('class');
        $type  = $element->getOption('type') ? : self::TYPE_DEFAULT;

        if (!in_array($type, self::TYPES, true)) {
            throw new Exception\DomainException(sprintf(
                '%s requires that the button type is one of "' . implode('", "', self::TYPES) . '"',
                __METHOD__
            ));
        }

        if ($class) {
            $class .= ' ';
        }
        $class .= 'btn btn-' . $type;
        $element->setAttribute('class', $class);
    }
protected function setElementClass ( ElementInterface $ element ) { $ class = $ element -> getAttribute ( 'class' ) ; $ type = $ element -> getOption ( 'type' ) ? : self :: TYPE_DEFAULT ; if ( ! in_array ( $ type , self :: TYPES , true ) ) { throw new Exception \ DomainException ( sprintf ( '%s requires that the button type is one of "' . implode ( '", "' , self :: TYPES ) . '"' , __METHOD__ ) ) ; } if ( $ class ) { $ class .= ' ' ; } $ class .= 'btn btn-' . $ type ; $ element -> setAttribute ( 'class' , $ class ) ; }
Set element class

@param  ElementInterface $element
@throws Exception\DomainException
Set element class