You are here

public function SearchApiViewsHandlerArgument::default_actions in Search API 7

Provide a list of default behaviors for this argument if the argument is not present.

Override this method to provide additional (or fewer) default behaviors.

Overrides views_handler_argument::default_actions

File

contrib/search_api_views/includes/handler_argument.inc, line 47
Contains SearchApiViewsHandlerArgument.

Class

SearchApiViewsHandlerArgument
Views argument handler class for handling all non-fulltext types.

Code

public function default_actions($which = NULL) {
  $defaults = array(
    'ignore' => array(
      'title' => t('Display all values'),
      'method' => 'default_ignore',
      'breadcrumb' => TRUE,
    ),
    'not found' => array(
      'title' => t('Hide view / Page not found (404)'),
      'method' => 'default_not_found',
      'hard fail' => TRUE,
    ),
    'empty' => array(
      'title' => t('Display empty text'),
      'method' => 'default_empty',
      'breadcrumb' => TRUE,
    ),
    'default' => array(
      'title' => t('Provide default argument'),
      'method' => 'default_default',
      'form method' => 'default_argument_form',
      'has default argument' => TRUE,
      'default only' => TRUE,
    ),
  );
  if ($which) {
    return isset($defaults[$which]) ? $defaults[$which] : NULL;
  }
  return $defaults;
}