public function getButton($details)
    {
        if (is_string($details)) {
            return HtmlHelper::get()->noContentElement('input', array(
                'type' => 'submit',
                'name' => $details,
                'value' => $this->translate(ucwords(str_replace('_', ' ', $details)))
            ));
        }
        if (isset($details['visible']) && $details['visible'] == false) {
            return ''; //return nothing if hidden;
        }
        $htmlOptions = isset($details['htmlOptions']) ? $details['htmlOptions'] : array();
        $htmlOptions['type'] = isset($details['type']) ? $details['type'] : 'submit';
        $htmlOptions['name'] = $details['name'];
        $htmlOptions['value'] = $this->translate($details['label']);
        return HtmlHelper::get()->noContentElement('input', $htmlOptions);
    }
public function getButton($details)
    {
        if (is_string($details)) {
            return HtmlHelper::get()->noContentElement('input', array(
                'type' => 'submit',
                'name' => $details,
                'value' => $this->translate(ucwords(str_replace('_', ' ', $details)))
            ));
        }
        if (isset($details['visible']) && $details['visible'] == false) {
            return ''; //return nothing if hidden;
        }
        $htmlOptions = isset($details['htmlOptions']) ? $details['htmlOptions'] : array();
        $htmlOptions['type'] = isset($details['type']) ? $details['type'] : 'submit';
        $htmlOptions['name'] = $details['name'];
        $htmlOptions['value'] = $this->translate($details['label']);
        return HtmlHelper::get()->noContentElement('input', $htmlOptions);
    }
public function getButton ( $ details ) { if ( is_string ( $ details ) ) { return HtmlHelper :: get ( ) -> noContentElement ( 'input' , array ( 'type' => 'submit' , 'name' => $ details , 'value' => $ this -> translate ( ucwords ( str_replace ( '_' , ' ' , $ details ) ) ) ) ) ; } if ( isset ( $ details [ 'visible' ] ) && $ details [ 'visible' ] == false ) { return '' ; //return nothing if hidden; } $ htmlOptions = isset ( $ details [ 'htmlOptions' ] ) ? $ details [ 'htmlOptions' ] : array ( ) ; $ htmlOptions [ 'type' ] = isset ( $ details [ 'type' ] ) ? $ details [ 'type' ] : 'submit' ; $ htmlOptions [ 'name' ] = $ details [ 'name' ] ; $ htmlOptions [ 'value' ] = $ this -> translate ( $ details [ 'label' ] ) ; return HtmlHelper :: get ( ) -> noContentElement ( 'input' , $ htmlOptions ) ; }
Return html code for a button.
@param string|array $details
@return string
Return html code for a button .