public function buildButton($type, $title, $name = '', $id = '', $class = '', $attributes = [])
    {
        // Create new form button
        $id = $id ?: 'fb' . mt_rand();
        $element = new FormButton($this->getHTMLDocument(), $type, $name, $id, $title, $attributes);

        // Add class
        $element->addClass($class);

        // Return form element
        return $element;
    }
public function buildButton($type, $title, $name = '', $id = '', $class = '', $attributes = [])
    {
        // Create new form button
        $id = $id ?: 'fb' . mt_rand();
        $element = new FormButton($this->getHTMLDocument(), $type, $name, $id, $title, $attributes);

        // Add class
        $element->addClass($class);

        // Return form element
        return $element;
    }
public function buildButton ( $ type , $ title , $ name = '' , $ id = '' , $ class = '' , $ attributes = [ ] ) { // Create new form button $ id = $ id ? : 'fb' . mt_rand ( ) ; $ element = new FormButton ( $ this -> getHTMLDocument ( ) , $ type , $ name , $ id , $ title , $ attributes ) ; // Add class $ element -> addClass ( $ class ) ; // Return form element return $ element ; }
Built an html form button.

@param string $type       The button's type
@param string $title      The button's title
@param string $name       The button's name attribute
@param string $id         The button's id attribute.
@param string $class      The extra class of the button
@param array  $attributes A set of extra attributes

@return FormElement
@throws Exception
Built an html form button .