Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function getTotal($records, $column)
- {
- $total = 0;
- foreach ($records as $record)
- {
- $total += $record->$column;
- }
- return $total;
- }
- 'weight' => array(
- 'name' => 'weight',
- 'footer' => $model->getTotal($model->search()->getData(), 'weight'),
- 'headerHtmlOptions' => array('width' => 50)
- ),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement