private function _getButtons($buttons, $row) {
        $html = '';
        foreach($buttons as $value) {
            if(isset($value['audit']) && $value['audit']($row) == 0) {
                continue;
            }
            $tmp='<a  href="';
            if(isset($value['url'])) {
                $tmp .= $this->evaluateExpression($value['url'], array('data'=>$row));
            } elseif(isset($value['action'])) {
                $value['options']['class']='gridview-'.$value['action'];
                $tmp.=url().'/'.$this->controller->id.'/'.$value['action'].'?id='.$row['id'].'&from='.urlencode($_SERVER['REQUEST_URI']);
            }
            $tmp .= '"';
            if (isset($value['options']) && is_array($value['options']) && !empty($value['options'])) {
                $tmp.=$this->_getOptions($value['options']);
            }
            $tmp.='">'.$value['name'].'</a>&nbsp;&nbsp;';

            $html.=$tmp;
        }

        return $html;
    }
private function _getButtons($buttons, $row) {
        $html = '';
        foreach($buttons as $value) {
            if(isset($value['audit']) && $value['audit']($row) == 0) {
                continue;
            }
            $tmp='<a  href="';
            if(isset($value['url'])) {
                $tmp .= $this->evaluateExpression($value['url'], array('data'=>$row));
            } elseif(isset($value['action'])) {
                $value['options']['class']='gridview-'.$value['action'];
                $tmp.=url().'/'.$this->controller->id.'/'.$value['action'].'?id='.$row['id'].'&from='.urlencode($_SERVER['REQUEST_URI']);
            }
            $tmp .= '"';
            if (isset($value['options']) && is_array($value['options']) && !empty($value['options'])) {
                $tmp.=$this->_getOptions($value['options']);
            }
            $tmp.='">'.$value['name'].'</a>&nbsp;&nbsp;';

            $html.=$tmp;
        }

        return $html;
    }
private function _getButtons ( $ buttons , $ row ) { $ html = '' ; foreach ( $ buttons as $ value ) { if ( isset ( $ value [ 'audit' ] ) && $ value [ 'audit' ] ( $ row ) == 0 ) { continue ; } $ tmp = '<a  href="' ; if ( isset ( $ value [ 'url' ] ) ) { $ tmp .= $ this -> evaluateExpression ( $ value [ 'url' ] , array ( 'data' => $ row ) ) ; } elseif ( isset ( $ value [ 'action' ] ) ) { $ value [ 'options' ] [ 'class' ] = 'gridview-' . $ value [ 'action' ] ; $ tmp .= url ( ) . '/' . $ this -> controller -> id . '/' . $ value [ 'action' ] . '?id=' . $ row [ 'id' ] . '&from=' . urlencode ( $ _SERVER [ 'REQUEST_URI' ] ) ; } $ tmp .= '"' ; if ( isset ( $ value [ 'options' ] ) && is_array ( $ value [ 'options' ] ) && ! empty ( $ value [ 'options' ] ) ) { $ tmp .= $ this -> _getOptions ( $ value [ 'options' ] ) ; } $ tmp .= '">' . $ value [ 'name' ] . '</a>&nbsp;&nbsp;' ; $ html .= $ tmp ; } return $ html ; }
get button html code
@param $buttons array the button array
@param $row array current row data
@return string the html code of button
get button html code