GridView.php
protected function renderExtraRow($model, $key, $index, $totals)
    {
        if ($this->extraRowValue instanceof Closure) {
            $content = call_user_func($this->extraRowValue, $model, $index, $totals);
        } else {
            $values = [];
            foreach ($this->extraRowColumns as $name) {
                $values[] = ArrayHelper::getValue($model, $name);
            }

            $content = '<strong>' . implode(' :: ', $values) . '</strong>';
        }

        $colspan = count($this->columns);

        $cell = Html::tag('td', $content, ['class' => $this->extraRowClass, 'colspan' => $colspan]);

        return Html::tag('tr', $cell);
    }
protected function renderExtraRow($model, $key, $index, $totals)
    {
        if ($this->extraRowValue instanceof Closure) {
            $content = call_user_func($this->extraRowValue, $model, $index, $totals);
        } else {
            $values = [];
            foreach ($this->extraRowColumns as $name) {
                $values[] = ArrayHelper::getValue($model, $name);
            }

            $content = '<strong>' . implode(' :: ', $values) . '</strong>';
        }

        $colspan = count($this->columns);

        $cell = Html::tag('td', $content, ['class' => $this->extraRowClass, 'colspan' => $colspan]);

        return Html::tag('tr', $cell);
    }
protected function renderExtraRow ( $ model , $ key , $ index , $ totals ) { if ( $ this -> extraRowValue instanceof Closure ) { $ content = call_user_func ( $ this -> extraRowValue , $ model , $ index , $ totals ) ; } else { $ values = [ ] ; foreach ( $ this -> extraRowColumns as $ name ) { $ values [ ] = ArrayHelper :: getValue ( $ model , $ name ) ; } $ content = '<strong>' . implode ( ' :: ' , $ values ) . '</strong>' ; } $ colspan = count ( $ this -> columns ) ; $ cell = Html :: tag ( 'td' , $ content , [ 'class' => $ this -> extraRowClass , 'colspan' => $ colspan ] ) ; return Html :: tag ( 'tr' , $ cell ) ; }
Renders extra row when required
@param mixed $model
@param mixed $key
@param int $index
@param number $totals
@return string the extra row
Renders extra row when required