GridView.php
protected function getExtraRowTotals($model, $index, $totals)
    {
        return $this->extraRowTotalsValue instanceof Closure
            ? call_user_func($this->extraRowTotalsValue, $model, $index, $totals)
            : [];
    }
protected function getExtraRowTotals($model, $index, $totals)
    {
        return $this->extraRowTotalsValue instanceof Closure
            ? call_user_func($this->extraRowTotalsValue, $model, $index, $totals)
            : [];
    }
protected function getExtraRowTotals ( $ model , $ index , $ totals ) { return $ this -> extraRowTotalsValue instanceof Closure ? call_user_func ( $ this -> extraRowTotalsValue , $ model , $ index , $ totals ) : [ ] ; }
If there is a Closure will return the newly calculated totals on the Closure according to the code specified by
the user.
@param mixed $model the data model being rendered
@param int $index the zero-based index of the data model among the models array
@param array $totals the calculated totals by the Closure
@return array|mixed
If there is a Closure will return the newly calculated totals on the Closure according to the code specified by the user .