function notifications_views_handler_argument_autocomplete::default_actions in Notifications 7
Same name and namespace in other branches
- 6.2 notifications_views/notifications_views_handler_argument_autocomplete.inc \notifications_views_handler_argument_autocomplete::default_actions()
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
- notifications_views/
includes/ 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;
}
}