You are here

function notifications_views_handler_argument_autocomplete::default_actions in Notifications 6.2

Same name and namespace in other branches
  1. 7 notifications_views/includes/notifications_views_handler_argument_autocomplete.inc \notifications_views_handler_argument_autocomplete::default_actions()

File

notifications_views/notifications_views_handler_argument_autocomplete.inc, line 11

Class

notifications_views_handler_argument_autocomplete
Argument handler to accept the first part of a string and complete the rest. See views_handler_filter_string.

Code

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) {
    if (!empty($defaults[$which])) {
      return $defaults[$which];
    }
  }
  else {
    return $defaults;
  }
}