function FilterNumericTest::getGroupedExposedFilters
Same name in other branches
- 9 core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php \Drupal\Tests\views\Kernel\Handler\FilterNumericTest::getGroupedExposedFilters()
- 10 core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php \Drupal\Tests\views\Kernel\Handler\FilterNumericTest::getGroupedExposedFilters()
- 11.x core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php \Drupal\Tests\views\Kernel\Handler\FilterNumericTest::getGroupedExposedFilters()
6 calls to FilterNumericTest::getGroupedExposedFilters()
- FilterNumericTest::testFilterNumericExposedGroupedBetween in core/
modules/ views/ tests/ src/ Kernel/ Handler/ FilterNumericTest.php - FilterNumericTest::testFilterNumericExposedGroupedEmpty in core/
modules/ views/ tests/ src/ Kernel/ Handler/ FilterNumericTest.php - FilterNumericTest::testFilterNumericExposedGroupedNotBetween in core/
modules/ views/ tests/ src/ Kernel/ Handler/ FilterNumericTest.php - FilterNumericTest::testFilterNumericExposedGroupedNotEmpty in core/
modules/ views/ tests/ src/ Kernel/ Handler/ FilterNumericTest.php - FilterNumericTest::testFilterNumericExposedGroupedRegularExpression in core/
modules/ views/ tests/ src/ Kernel/ Handler/ FilterNumericTest.php - Tests the numeric filter handler with the 'regular_expression' operator to grouped exposed filters.
File
-
core/
modules/ views/ tests/ src/ Kernel/ Handler/ FilterNumericTest.php, line 453
Class
- FilterNumericTest
- Tests the numeric filter handler.
Namespace
Drupal\Tests\views\Kernel\HandlerCode
protected function getGroupedExposedFilters() {
$filters = [
'age' => [
'id' => 'age',
'plugin_id' => 'numeric',
'table' => 'views_test_data',
'field' => 'age',
'relationship' => 'none',
'exposed' => TRUE,
'expose' => [
'operator' => 'age_op',
'label' => 'age',
'identifier' => 'age',
],
'is_grouped' => TRUE,
'group_info' => [
'label' => 'age',
'identifier' => 'age',
'default_group' => 'All',
'group_items' => [
1 => [
'title' => 'Age is 28',
'operator' => '=',
'value' => [
'value' => 28,
],
],
2 => [
'title' => 'Age is between 26 and 29',
'operator' => 'between',
'value' => [
'min' => 26,
'max' => 29,
],
],
3 => [
'title' => 'Age is not between 26 and 29',
'operator' => 'not between',
'value' => [
'min' => 26,
'max' => 29,
],
],
4 => [
'title' => 'Age is empty',
'operator' => 'empty',
],
5 => [
'title' => 'Age is not empty',
'operator' => 'not empty',
],
6 => [
'title' => 'Age is regexp 2[7-8]',
'operator' => 'regular_expression',
'value' => [
'value' => '2[7-8]',
],
],
],
],
],
];
return $filters;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.