efq_views_handler_filter_in_operator.inc in EntityFieldQuery Views Backend 7
Definition of views_handler_filter_in_operator.
File
handlers/efq_views_handler_filter_in_operator.incView source
<?php
/**
* @file
* Definition of views_handler_filter_in_operator.
*/
/**
* Simple filter to handle matching of multiple options selectable via checkboxes
*
* Definition items:
* - options callback: The function to call in order to generate the value options. If omitted, the options 'Yes' and 'No' will be used.
* - options arguments: An array of arguments to pass to the options callback.
*
* @ingroup views_filter_handlers
*/
class efq_views_handler_filter_in_operator extends views_handler_filter_in_operator {
/**
* This kind of construct makes it relatively easy for a child class
* to add or remove functionality by overriding this function and
* adding/removing items from this array.
*/
function operators() {
$operators = array(
'IN' => array(
'title' => t('Is one of'),
'short' => t('in'),
'short_single' => t('='),
'method' => 'op_simple',
'values' => 1,
),
'NOT IN' => array(
'title' => t('Is not one of'),
'short' => t('not in'),
'short_single' => t('<>'),
'method' => 'op_simple',
'values' => 1,
),
);
return $operators;
}
function option_definition() {
$options = parent::option_definition();
$options['operator']['default'] = 'IN';
return $options;
}
}
Classes
Name![]() |
Description |
---|---|
efq_views_handler_filter_in_operator | Simple filter to handle matching of multiple options selectable via checkboxes |