You are here

protected function FilterNumericTest::getGroupedExposedFilters in Views (for Drupal 7) 8.3

5 calls to FilterNumericTest::getGroupedExposedFilters()
FilterNumericTest::testFilterNumericExposedGroupedBetween in lib/Drupal/views/Tests/Handler/FilterNumericTest.php
FilterNumericTest::testFilterNumericExposedGroupedEmpty in lib/Drupal/views/Tests/Handler/FilterNumericTest.php
FilterNumericTest::testFilterNumericExposedGroupedNotBetween in lib/Drupal/views/Tests/Handler/FilterNumericTest.php
FilterNumericTest::testFilterNumericExposedGroupedNotEmpty in lib/Drupal/views/Tests/Handler/FilterNumericTest.php
FilterNumericTest::testFilterNumericExposedGroupedSimple in lib/Drupal/views/Tests/Handler/FilterNumericTest.php

File

lib/Drupal/views/Tests/Handler/FilterNumericTest.php, line 359
Definition of Drupal\views\Tests\Handler\FilterNumericTest.

Class

FilterNumericTest
Tests the numeric filter handler.

Namespace

Drupal\views\Tests\Handler

Code

protected function getGroupedExposedFilters() {
  $filters = array(
    'age' => array(
      'id' => 'age',
      'table' => 'views_test_data',
      'field' => 'age',
      'relationship' => 'none',
      'exposed' => TRUE,
      'expose' => array(
        'operator' => 'age_op',
        'label' => 'age',
        'identifier' => 'age',
      ),
      'is_grouped' => TRUE,
      'group_info' => array(
        'label' => 'age',
        'identifier' => 'age',
        'default_group' => 'All',
        'group_items' => array(
          1 => array(
            'title' => 'Age is 28',
            'operator' => '=',
            'value' => array(
              'value' => 28,
            ),
          ),
          2 => array(
            'title' => 'Age is between 26 and 29',
            'operator' => 'between',
            'value' => array(
              'min' => 26,
              'max' => 29,
            ),
          ),
          3 => array(
            'title' => 'Age is not between 26 and 29',
            'operator' => 'not between',
            'value' => array(
              'min' => 26,
              'max' => 29,
            ),
          ),
          4 => array(
            'title' => 'Age is empty',
            'operator' => 'empty',
          ),
          5 => array(
            'title' => 'Age is not empty',
            'operator' => 'not empty',
          ),
        ),
      ),
    ),
  );
  return $filters;
}