You are here

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

2 calls to FilterInOperatorTest::getGroupedExposedFilters()
FilterInOperatorTest::testFilterInOperatorGroupedExposedSimple in lib/Drupal/views/Tests/Handler/FilterInOperatorTest.php
FilterInOperatorTest::testFilterNotInOperatorGroupedExposedSimple in lib/Drupal/views/Tests/Handler/FilterInOperatorTest.php

File

lib/Drupal/views/Tests/Handler/FilterInOperatorTest.php, line 168
Definition of Drupal\views\Tests\Handler\FilterInOperatorTest.

Class

FilterInOperatorTest
Tests the core Drupal\views\Plugin\views\filter\InOperator 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 one of 26, 30',
            'operator' => 'in',
            'value' => array(
              26,
              30,
            ),
          ),
          2 => array(
            'title' => 'Age is not one of 26, 30',
            'operator' => 'not in',
            'value' => array(
              26,
              30,
            ),
          ),
        ),
      ),
    ),
  );
  return $filters;
}