function apachesolr_views_handler_argument::default_actions in Apache Solr Views 6
Provide a list of default behaviors for this argument if the argument is not present.
Provide fewer methods that the standard. Remove summary views
File
- handlers/
apachesolr_views_handler_argument.inc, line 57
Class
- apachesolr_views_handler_argument
- Class that allows searching the site with Apache Solr through a view.
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;
}
}