function InOperator::operators in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Plugin/views/filter/InOperator.php \Drupal\views\Plugin\views\filter\InOperator::operators()
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.
4 calls to InOperator::operators()
- InOperator::adminSummary in core/
modules/ views/ src/ Plugin/ views/ filter/ InOperator.php - Display the filter on the administrative summary
- InOperator::operatorOptions in core/
modules/ views/ src/ Plugin/ views/ filter/ InOperator.php - Build strings from the operators() for 'select' options
- InOperator::operatorValues in core/
modules/ views/ src/ Plugin/ views/ filter/ InOperator.php - InOperator::query in core/
modules/ views/ src/ Plugin/ views/ filter/ InOperator.php - Add this filter to the query.
1 method overrides InOperator::operators()
- ManyToOne::operators in core/
modules/ views/ src/ Plugin/ views/ filter/ ManyToOne.php - 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.
File
- core/
modules/ views/ src/ Plugin/ views/ filter/ InOperator.php, line 115 - Contains \Drupal\views\Plugin\views\filter\InOperator.
Class
- InOperator
- Simple filter to handle matching of multiple options selectable via checkboxes
Namespace
Drupal\views\Plugin\views\filterCode
function operators() {
$operators = array(
'in' => array(
'title' => $this
->t('Is one of'),
'short' => $this
->t('in'),
'short_single' => $this
->t('='),
'method' => 'opSimple',
'values' => 1,
),
'not in' => array(
'title' => $this
->t('Is not one of'),
'short' => $this
->t('not in'),
'short_single' => $this
->t('<>'),
'method' => 'opSimple',
'values' => 1,
),
);
// if the definition allows for the empty operator, add it.
if (!empty($this->definition['allow empty'])) {
$operators += array(
'empty' => array(
'title' => $this
->t('Is empty (NULL)'),
'method' => 'opEmpty',
'short' => $this
->t('empty'),
'values' => 0,
),
'not empty' => array(
'title' => $this
->t('Is not empty (NOT NULL)'),
'method' => 'opEmpty',
'short' => $this
->t('not empty'),
'values' => 0,
),
);
}
return $operators;
}