public function render($name = '', $content = '', array $attrs = array(), $type = 'submit')
    {
        $attrs = array_merge(array('text' => null, 'name' => $name), $attrs);

        $attrs = $this->_getBtnClasses($attrs);
        $attrs['type'] = $type;

        if (Arr::key('icon', $attrs)) {
            $content = '<i class="' . $this->_icon . '-' . $attrs['icon'] . '"></i> ' . $this->_translate($content);
            unset($attrs['icon']);
        }

        return '<button ' . $this->buildAttrs($attrs) . '>' . $content . '</button>';
    }
public function render($name = '', $content = '', array $attrs = array(), $type = 'submit')
    {
        $attrs = array_merge(array('text' => null, 'name' => $name), $attrs);

        $attrs = $this->_getBtnClasses($attrs);
        $attrs['type'] = $type;

        if (Arr::key('icon', $attrs)) {
            $content = '<i class="' . $this->_icon . '-' . $attrs['icon'] . '"></i> ' . $this->_translate($content);
            unset($attrs['icon']);
        }

        return '<button ' . $this->buildAttrs($attrs) . '>' . $content . '</button>';
    }
public function render ( $ name = '' , $ content = '' , array $ attrs = array ( ) , $ type = 'submit' ) { $ attrs = array_merge ( array ( 'text' => null , 'name' => $ name ) , $ attrs ) ; $ attrs = $ this -> _getBtnClasses ( $ attrs ) ; $ attrs [ 'type' ] = $ type ; if ( Arr :: key ( 'icon' , $ attrs ) ) { $ content = '<i class="' . $ this -> _icon . '-' . $ attrs [ 'icon' ] . '"></i> ' . $ this -> _translate ( $ content ) ; unset ( $ attrs [ 'icon' ] ) ; } return '<button ' . $ this -> buildAttrs ( $ attrs ) . '>' . $ content . '</button>' ; }
Crete button.

@param string $name
@param string $content
@param array $attrs
@param string $type
@return string
Crete button .