You are here

public function views_handler_argument_null::default_actions in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 handlers/views_handler_argument_null.inc \views_handler_argument_null::default_actions()
  2. 6.2 handlers/views_handler_argument_null.inc \views_handler_argument_null::default_actions()

Override default_actions() to remove actions that don't make sense for a null argument.

Overrides views_handler_argument::default_actions

File

handlers/views_handler_argument_null.inc, line 45
Definition of views_handler_argument_null.

Class

views_handler_argument_null
Argument handler that ignores the argument.

Code

public function default_actions($which = NULL) {
  if ($which) {
    if (in_array($which, array(
      'ignore',
      'not found',
      'empty',
      'default',
      'access denied',
    ))) {
      return parent::default_actions($which);
    }
    return;
  }
  $actions = parent::default_actions();
  unset($actions['summary asc']);
  unset($actions['summary desc']);
  return $actions;
}