/** * {@inheritdoc} */ public function defaultActions($which = NULL) { $defaults = parent::defaultActions(); unset($defaults['summary']); if ($which) { return isset($defaults[$which]) ? $defaults[$which] : NULL; } return $defaults; }
protected function defaultActions($which = NULL) { // Disallow summary views on this argument. if (!$which) { $actions = parent::defaultActions(); unset($actions['summary asc']); unset($actions['summary desc']); return $actions; } if ($which != 'summary asc' && $which != 'summary desc') { return parent::defaultActions($which); } }
/** * Override defaultActions() to remove actions that don't * make sense for a null argument. */ protected function defaultActions($which = NULL) { if ($which) { if (in_array($which, array('ignore', 'not found', 'empty', 'default'))) { return parent::defaultActions($which); } return; } $actions = parent::defaultActions(); unset($actions['summary asc']); unset($actions['summary desc']); return $actions; }