1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099 |
- <?php
- /**
- * Tests the many to one helper handler class.
- */
- class ViewsHandlerManyToOneTest extends ViewsSqlTest {
- /**
- * Field definitions used by this test.
- *
- * @var array
- */
- protected $fields;
- /**
- * Instances of fields used by this test.
- *
- * @var array
- */
- protected $instances;
- /**
- * Nodes used by this test.
- *
- * @var object[]
- */
- protected $nodes;
- /**
- * Accounts used by this test.
- *
- * @var object[]
- */
- protected $accounts;
- /**
- * Terms used by this test.
- *
- * @var object[]
- */
- protected $terms;
- /**
- * Provide the test's meta information.
- */
- public static function getInfo() {
- return array(
- 'name' => 'Handler: Many To One Helper',
- 'description' => 'Tests the many to one helper handler',
- 'group' => 'Views Handlers',
- );
- }
- /**
- * Clears views data cache.
- */
- protected function clearViewsDataCache() {
- drupal_static_reset('_views_fetch_data_cache');
- drupal_static_reset('_views_fetch_data_recursion_protected');
- drupal_static_reset('_views_fetch_data_fully_loaded');
- }
- /**
- * Returns a new term with random properties.
- *
- * @param string $vocabulary
- * Vocabulary ID to create term in.
- *
- * @return object
- * Term with random properties.
- */
- protected function createTerm($vocabulary) {
- $term = new stdClass();
- $term->name = $this->randomName();
- $term->description = $this->randomName();
- // Use the first available text format.
- $term->format = db_query_range('SELECT format FROM {filter_format}', 0, 1)->fetchField();
- $term->vid = $vocabulary->vid;
- taxonomy_term_save($term);
- return $term;
- }
- /**
- * {@inheritdoc}
- */
- public function setUp() {
- parent::setUp();
- // Create boolean field.
- $this->fields[0] = array(
- 'field_name' => 'field_bool',
- 'type' => 'list_boolean',
- 'cardinality' => 1,
- 'settings' => array(
- 'allowed_values' => array(
- 0 => '',
- 1 => '',
- ),
- ),
- );
- $this->fields[0] = field_create_field($this->fields[0]);
- // Create text list field.
- $this->fields[1] = array(
- 'field_name' => 'field_list',
- 'type' => 'list_text',
- 'cardinality' => FIELD_CARDINALITY_UNLIMITED,
- 'settings' => array(
- 'allowed_values' => array(
- 1 => '1',
- 2 => '2',
- 3 => '3',
- ),
- ),
- );
- $this->fields[1] = field_create_field($this->fields[1]);
- // Create boolean field instance for article nodes.
- $instance = array(
- 'field_name' => $this->fields[0]['field_name'],
- 'entity_type' => 'node',
- 'bundle' => 'article',
- 'widget' => array(
- 'type' => 'options_onoff',
- ),
- );
- $this->instances[0][] = field_create_instance($instance);
- // Create text list field instance for article nodes.
- $instance = array(
- 'field_name' => $this->fields[1]['field_name'],
- 'entity_type' => 'node',
- 'bundle' => 'article',
- 'widget' => array(
- 'type' => 'options_buttons',
- ),
- );
- $this->instances[1][] = field_create_instance($instance);
- // Create boolean field instance for users.
- $instance = array(
- 'field_name' => $this->fields[0]['field_name'],
- 'entity_type' => 'user',
- 'bundle' => 'user',
- 'widget' => array(
- 'type' => 'options_onoff',
- ),
- );
- $this->instances[0][] = field_create_instance($instance);
- // Create text list field instance for users.
- $instance = array(
- 'field_name' => $this->fields[1]['field_name'],
- 'entity_type' => 'user',
- 'bundle' => 'user',
- 'widget' => array(
- 'type' => 'options_buttons',
- ),
- );
- $this->instances[1][] = field_create_instance($instance);
- // Create tags field instance for users.
- $instance = array(
- 'field_name' => 'field_tags',
- 'entity_type' => 'user',
- 'bundle' => 'user',
- );
- $this->instances[2][] = field_create_instance($instance);
- // Clear views data cache.
- $this->clearViewsDataCache();
- // Create 62 tags.
- $vocabulary = taxonomy_vocabulary_machine_name_load('tags');
- for ($i = 0; $i < 62; $i++) {
- $this->terms[] = $this->createTerm($vocabulary);
- }
- // Create a node where the field_bool is checked, field_list is '1' and
- // tag is term 2.
- $node = array();
- $node['type'] = 'article';
- $node[$this->fields[0]['field_name']][LANGUAGE_NONE][]['value'] = '1';
- $node[$this->fields[1]['field_name']][LANGUAGE_NONE][]['value'] = '1';
- $node['field_tags'][LANGUAGE_NONE][]['tid'] = $this->terms[1]->tid;
- $this->nodes[0] = $this->drupalCreateNode($node);
- // Create a node where the field_bool is not checked, field_list is empty
- // and tag is term 1.
- $node = array();
- $node['type'] = 'article';
- $node[$this->fields[0]['field_name']] = array();
- $node[$this->fields[1]['field_name']] = array();
- $node['field_tags'][LANGUAGE_NONE][]['tid'] = $this->terms[0]->tid;
- $this->nodes[1] = $this->drupalCreateNode($node);
- // Create a node where the field_bool is not checked, field_list is empty
- // and tag is term 1 and 2.
- $node = array();
- $node['type'] = 'article';
- $node[$this->fields[0]['field_name']] = array();
- $node[$this->fields[1]['field_name']] = array();
- $node['field_tags'][LANGUAGE_NONE][]['tid'] = $this->terms[0]->tid;
- $node['field_tags'][LANGUAGE_NONE][]['tid'] = $this->terms[1]->tid;
- $this->nodes[2] = $this->drupalCreateNode($node);
- // Create a user where field_bool is checked, field_list is '1' and tag is
- // term 1.
- $permissions = array('access content');
- $account = $this->drupalCreateUser($permissions);
- $account->{$this->fields[0]['field_name']}[LANGUAGE_NONE][]['value'] = '1';
- $account->{$this->fields[1]['field_name']}[LANGUAGE_NONE][]['value'] = '1';
- $account->field_tags[LANGUAGE_NONE][]['tid'] = $this->terms[0]->tid;
- $this->accounts[0] = user_save($account);
- }
- /**
- * Tests "none of" filter with terms in excess of JOIN limit selected.
- */
- public function testJoinLimitNoneOf() {
- $view = $this->getJoinLimitNoneOfTestView();
- $this->executeView($view);
- // Assert that nodes have been created and have expected field values.
- $value = field_get_items('node', $this->nodes[0], 'field_tags', LANGUAGE_NONE);
- $value = isset($value[0]['tid']) ? (int) $value[0]['tid'] : 0;
- $this->assertIdentical($value, 2, 'First node has been created and tags field references term 2.');
- $value = field_get_items('node', $this->nodes[1], 'field_tags', LANGUAGE_NONE);
- $value = isset($value[0]['tid']) ? (int) $value[0]['tid'] : 0;
- $this->assertIdentical($value, 1, 'Second node has been created and tags field references term 1.');
- // Assert that user has been created and has expected field values.
- $value = field_get_items('user', $this->accounts[0], 'field_tags', LANGUAGE_NONE);
- $value = isset($value[0]['tid']) ? (int) $value[0]['tid'] : 0;
- $this->assertIdentical($value, 1, 'User has been created and tags field references term 1.');
- // Assert that node id with empty field value matches user id so that the
- // node would be excluded from the result, if the joins are missing extras.
- $this->assertIdentical((int) $this->accounts[0]->uid, (int) $this->nodes[1]->nid, 'Node id of second node matches uid of first user.');
- // Assert correct result set.
- $result_count = isset($view->result) && is_array($view->result) ? count($view->result) : 0;
- $this->assertEqual($result_count, 1, 'View has one result.');
- $nid = isset($view->result[0]->nid) ? (int) $view->result[0]->nid : 0;
- $this->assertIdentical($nid, (int) $this->nodes[1]->nid, 'View result has correct node id.');
- }
- /**
- * Tests duplicate grouped "none of" filters on boolean field.
- */
- public function testGroupedNoneOf() {
- $view = $this->getGroupedNoneOfTestView();
- $this->executeView($view);
- // Assert that nodes have been created and have expected field values.
- $value = field_get_items('node', $this->nodes[0], $this->fields[0]['field_name'], LANGUAGE_NONE);
- $value = isset($value[0]['value']) ? (int) $value[0]['value'] : 0;
- $this->assertIdentical($value, 1, 'First node has been created and boolean field is checked.');
- $value = field_get_items('node', $this->nodes[1], $this->fields[0]['field_name'], LANGUAGE_NONE);
- $this->assertFalse($value, 'Second node has been created and boolean field is not checked.');
- $value = field_get_items('node', $this->nodes[2], $this->fields[0]['field_name'], LANGUAGE_NONE);
- $this->assertFalse($value, 'Third node has been created and boolean field is not checked.');
- // Assert that user has been created and has expected field values.
- $value = field_get_items('user', $this->accounts[0], $this->fields[0]['field_name'], LANGUAGE_NONE);
- $value = isset($value[0]['value']) ? (int) $value[0]['value'] : 0;
- $this->assertIdentical($value, 1, 'User has been created and boolean field is checked.');
- // Assert that node ID with empty field value matches user ID so that the
- // node would be excluded from the result, if the joins are missing extras.
- $this->assertIdentical((int) $this->accounts[0]->uid, (int) $this->nodes[1]->nid, 'Node ID of second node matches UID of first user.');
- // Assert correct result set.
- $result_count = isset($view->result) && is_array($view->result) ? count($view->result) : 0;
- $this->assertEqual($result_count, 2, 'View has two results.');
- $nid = isset($view->result[0]->nid) ? (int) $view->result[0]->nid : 0;
- $result1 = ($nid === (int) $this->nodes[1]->nid);
- $nid = isset($view->result[1]->nid) ? (int) $view->result[1]->nid : 0;
- $result2 = ($nid === (int) $this->nodes[2]->nid);
- $this->assertTrue($result1 && $result2, 'View result has correct node IDs.');
- }
- /**
- * Tests duplicate grouped "one of" filters on taxonomy term field.
- */
- public function testGroupedOneOf() {
- $view = $this->getGroupedOneOfTestView();
- $this->executeView($view);
- // Assert that nodes have been created and have expected field values.
- $value = field_get_items('node', $this->nodes[0], 'field_tags', LANGUAGE_NONE);
- $value = isset($value[0]['tid']) ? (int) $value[0]['tid'] : 0;
- $this->assertIdentical($value, 2, 'First node has been created and tags field references term 2.');
- $value = field_get_items('node', $this->nodes[1], 'field_tags', LANGUAGE_NONE);
- $value = isset($value[0]['tid']) ? (int) $value[0]['tid'] : 0;
- $this->assertIdentical($value, 1, 'Second node has been created and tags field references term 1.');
- $value = field_get_items('node', $this->nodes[2], 'field_tags', LANGUAGE_NONE);
- $value = !empty($value[0]['tid']) && !empty($value[1]['tid']);
- $this->assertTrue($value, 'Third node has been created and tags field references both terms 1 and 2.');
- // Assert that user has been created and has expected field values.
- $value = field_get_items('user', $this->accounts[0], 'field_tags', LANGUAGE_NONE);
- $value = isset($value[0]['tid']) ? (int) $value[0]['tid'] : 0;
- $this->assertIdentical($value, 1, 'User has been created and tags field references term 1.');
- // Assert that node ID with empty field value matches user ID so that the
- // node would be excluded from the result, if the joins are missing extras.
- $this->assertIdentical((int) $this->accounts[0]->uid, (int) $this->nodes[1]->nid, 'Node ID of second node matches UID of first user.');
- // Assert correct result set.
- $result_count = isset($view->result) && is_array($view->result) ? count($view->result) : 0;
- $this->assertEqual($result_count, 2, 'View has two results.');
- $nid = isset($view->result[0]->nid) ? (int) $view->result[0]->nid : 0;
- $result1 = ($nid === (int) $this->nodes[1]->nid);
- $nid = isset($view->result[1]->nid) ? (int) $view->result[1]->nid : 0;
- $result2 = ($nid === (int) $this->nodes[2]->nid);
- $this->assertTrue($result1 && $result2, 'View result has correct node IDs.');
- }
- /**
- * Tests exposed filter with "Reduce duplicates." and grouped options.
- */
- public function testReducedExposedGroupedOptions() {
- // Assert that nodes have been created and have expected field values.
- $value = field_get_items('node', $this->nodes[0], 'field_list', LANGUAGE_NONE);
- $value = isset($value[0]['value']) ? (int) $value[0]['value'] : 0;
- $this->assertIdentical($value, 1, 'First node has been created and list field has value 1.');
- $value = field_get_items('node', $this->nodes[1], 'field_list', LANGUAGE_NONE);
- $this->assertFalse($value, 'Second node has been created and list field is empty.');
- $value = field_get_items('node', $this->nodes[2], 'field_list', LANGUAGE_NONE);
- $this->assertFalse($value, 'Third node has been created and list field is empty.');
- // Assert that user has been created and has expected field values.
- $value = field_get_items('user', $this->accounts[0], 'field_list', LANGUAGE_NONE);
- $value = isset($value[0]['value']) ? (int) $value[0]['value'] : 0;
- $this->assertIdentical($value, 1, 'User has been created and list field has value 1.');
- // Assert that node ID with empty field value matches user ID so that the
- // node would be excluded from the result option 1, if the joins are missing
- // extras.
- $this->assertIdentical((int) $this->accounts[0]->uid, (int) $this->nodes[1]->nid, 'Node ID of second node matches UID of first user.');
- // Default option: Any.
- $view = $this->getReducedExposedGroupedOptionsTestView();
- $this->executeView($view);
- // Assert correct result set.
- $result_count = isset($view->result) && is_array($view->result) ? count($view->result) : 0;
- $this->assertEqual($result_count, 3, 'Default option: View has three results.');
- $nid = isset($view->result[0]->nid) ? (int) $view->result[0]->nid : 0;
- $result1 = ($nid === (int) $this->nodes[0]->nid);
- $nid = isset($view->result[1]->nid) ? (int) $view->result[1]->nid : 0;
- $result2 = ($nid === (int) $this->nodes[1]->nid);
- $nid = isset($view->result[2]->nid) ? (int) $view->result[2]->nid : 0;
- $result3 = ($nid === (int) $this->nodes[2]->nid);
- $this->assertTrue($result1 && $result2 && $result3, 'Default option: View result has correct node ID.');
- // Option 1: Is none of 1 or 2.
- $view = $this->getReducedExposedGroupedOptionsTestView();
- $view->set_exposed_input(array(
- 'field_list_value' => '1',
- ));
- $this->executeView($view);
- // Assert correct result set.
- $result_count = isset($view->result) && is_array($view->result) ? count($view->result) : 0;
- $this->assertEqual($result_count, 2, 'Option 1: View has two results.');
- $nid = isset($view->result[0]->nid) ? (int) $view->result[0]->nid : 0;
- $result1 = ($nid === (int) $this->nodes[1]->nid);
- $nid = isset($view->result[1]->nid) ? (int) $view->result[1]->nid : 0;
- $result2 = ($nid === (int) $this->nodes[2]->nid);
- $this->assertTrue($result1 && $result2, 'Option 1: View result has correct node ID.');
- // Option 2: Is one of 1.
- $view = $this->getReducedExposedGroupedOptionsTestView();
- $view->set_exposed_input(array(
- 'field_list_value' => '2',
- ));
- $this->executeView($view);
- // Assert correct result set.
- $result_count = isset($view->result) && is_array($view->result) ? count($view->result) : 0;
- $this->assertEqual($result_count, 1, 'Option 2: View has one result.');
- $nid = isset($view->result[0]->nid) ? (int) $view->result[0]->nid : 0;
- $this->assertIdentical($nid, (int) $this->nodes[0]->nid, 'Option 2: View result has correct node ID.');
- // Option 3: Is one of 1 or 2.
- $view = $this->getReducedExposedGroupedOptionsTestView();
- $view->set_exposed_input(array(
- 'field_list_value' => '3',
- ));
- $this->executeView($view);
- // Assert correct result set.
- $result_count = isset($view->result) && is_array($view->result) ? count($view->result) : 0;
- $this->assertEqual($result_count, 1, 'Option 3: View has one result.');
- $nid = isset($view->result[0]->nid) ? (int) $view->result[0]->nid : 0;
- $this->assertIdentical($nid, (int) $this->nodes[0]->nid, 'Option 3: View result has correct node ID.');
- /* @todo: Fix and uncomment in issue #3045168.
- * // Option 4: Is all of 1 and 2.
- * $view = $this->getReducedExposedGroupedOptionsTestView();
- * $view->set_exposed_input(array(
- * 'field_list_value' => '4',
- * ));
- * $this->executeView($view);
- *
- * // Assert correct result set.
- * $result_count = isset($view->result) && is_array($view->result) ? count($view->result) : 1;
- * $this->assertEqual($result_count, 0, 'Option 4: View has empty result.');
- */
- // Option 5: Is empty.
- $view = $this->getReducedExposedGroupedOptionsTestView();
- $view->set_exposed_input(array(
- 'field_list_value' => '5',
- ));
- $this->executeView($view);
- // Assert correct result set.
- $result_count = isset($view->result) && is_array($view->result) ? count($view->result) : 0;
- $this->assertEqual($result_count, 2, 'Option 5: View has two results.');
- $nid = isset($view->result[0]->nid) ? (int) $view->result[0]->nid : 0;
- $result1 = ($nid === (int) $this->nodes[1]->nid);
- $nid = isset($view->result[1]->nid) ? (int) $view->result[1]->nid : 0;
- $result2 = ($nid === (int) $this->nodes[2]->nid);
- $this->assertTrue($result1 && $result2, 'Option 5: View result has correct node IDs.');
- // Option 6: Is not empty.
- $view = $this->getReducedExposedGroupedOptionsTestView();
- $view->set_exposed_input(array(
- 'field_list_value' => '6',
- ));
- $this->executeView($view);
- // Assert correct result set.
- $result_count = isset($view->result) && is_array($view->result) ? count($view->result) : 0;
- $this->assertEqual($result_count, 1, 'Option 6: View has one result.');
- $nid = isset($view->result[0]->nid) ? (int) $view->result[0]->nid : 0;
- $this->assertIdentical($nid, (int) $this->nodes[0]->nid, 'Option 6: View result has correct node ID.');
- }
- /**
- * Tests exposed filter on term ID with grouped options.
- */
- public function testTermIdExposedGroupedOptions() {
- // Assert that nodes have been created and have expected field values.
- $value = field_get_items('node', $this->nodes[0], 'field_tags', LANGUAGE_NONE);
- $value = isset($value[0]['tid']) ? (int) $value[0]['tid'] : 0;
- $this->assertIdentical($value, 2, 'First node has been created and tags field references term 2.');
- $value = field_get_items('node', $this->nodes[1], 'field_tags', LANGUAGE_NONE);
- $value = isset($value[0]['tid']) ? (int) $value[0]['tid'] : 0;
- $this->assertIdentical($value, 1, 'Second node has been created and tags field references term 1.');
- // Assert that user has been created and has expected field values.
- $value = field_get_items('user', $this->accounts[0], 'field_tags', LANGUAGE_NONE);
- $value = isset($value[0]['tid']) ? (int) $value[0]['tid'] : 0;
- $this->assertIdentical($value, 1, 'User has been created and tags field references term 1.');
- // Assert that node ID with empty field value matches user ID so that the
- // node would be excluded from the result option 1, if the joins are missing
- // extras.
- $this->assertIdentical((int) $this->accounts[0]->uid, (int) $this->nodes[1]->nid, 'Node ID of second node matches UID of first user.');
- // Default option: Any.
- $view = $this->getTermIdExposedGroupedOptionsTestView();
- $this->executeView($view);
- // Assert correct result set.
- $result_count = isset($view->result) && is_array($view->result) ? count($view->result) : 0;
- $this->assertEqual($result_count, 3, 'Default option: View has three results.');
- $nid = isset($view->result[0]->nid) ? (int) $view->result[0]->nid : 0;
- $result1 = ($nid === (int) $this->nodes[0]->nid);
- $nid = isset($view->result[1]->nid) ? (int) $view->result[1]->nid : 0;
- $result2 = ($nid === (int) $this->nodes[1]->nid);
- $nid = isset($view->result[2]->nid) ? (int) $view->result[2]->nid : 0;
- $result3 = ($nid === (int) $this->nodes[2]->nid);
- $this->assertTrue($result1 && $result2 && $result3, 'Default option: View result has correct node ID.');
- // Option 1: Is none of 2.
- $view = $this->getTermIdExposedGroupedOptionsTestView();
- $view->set_exposed_input(array(
- 'field_tags_tid' => '1',
- ));
- $this->executeView($view);
- // Assert correct result set.
- $result_count = isset($view->result) && is_array($view->result) ? count($view->result) : 0;
- $this->assertEqual($result_count, 1, 'Option 1: View has one result.');
- $nid = isset($view->result[0]->nid) ? (int) $view->result[0]->nid : 0;
- $this->assertIdentical($nid, (int) $this->nodes[1]->nid, 'Option 1: View result has correct node ID.');
- // Option 2: Is none of 1 or 2.
- $view = $this->getTermIdExposedGroupedOptionsTestView();
- $view->set_exposed_input(array(
- 'field_tags_tid' => '2',
- ));
- $this->executeView($view);
- // Assert correct result set.
- $result_count = isset($view->result) && is_array($view->result) ? count($view->result) : 1;
- $this->assertEqual($result_count, 0, 'Option 2: View has empty result.');
- // Option 3: Is one of 1.
- $view = $this->getTermIdExposedGroupedOptionsTestView();
- $view->set_exposed_input(array(
- 'field_tags_tid' => '3',
- ));
- $this->executeView($view);
- // Assert correct result set.
- $result_count = isset($view->result) && is_array($view->result) ? count($view->result) : 0;
- $this->assertEqual($result_count, 2, 'Option 3: View has two results.');
- $nid = isset($view->result[0]->nid) ? (int) $view->result[0]->nid : 0;
- $result1 = ($nid === (int) $this->nodes[1]->nid);
- $nid = isset($view->result[1]->nid) ? (int) $view->result[1]->nid : 0;
- $result2 = ($nid === (int) $this->nodes[2]->nid);
- $this->assertTrue($result1 && $result2, 'Option 3: View result has correct node ID.');
- // Option 4: Is one of 1 or 2.
- $view = $this->getTermIdExposedGroupedOptionsTestView();
- $view->set_exposed_input(array(
- 'field_tags_tid' => '4',
- ));
- $this->executeView($view);
- // Assert correct result set.
- $result_count = isset($view->result) && is_array($view->result) ? count($view->result) : 0;
- $nid = isset($view->result[0]->nid) ? (int) $view->result[0]->nid : 0;
- $result1 = ($nid === (int) $this->nodes[0]->nid);
- $nid = isset($view->result[1]->nid) ? (int) $view->result[1]->nid : 0;
- $result2 = ($nid === (int) $this->nodes[1]->nid);
- $nid = isset($view->result[2]->nid) ? (int) $view->result[2]->nid : 0;
- $result3 = ($nid === (int) $this->nodes[2]->nid);
- $nid = isset($view->result[3]->nid) ? (int) $view->result[3]->nid : 0;
- $result4 = ($nid === (int) $this->nodes[2]->nid);
- $this->assertTrue($result1 && $result2 && $result3 && $result4, 'Option 4: View result has correct node ID.');
- $this->verbose($view->result);
- $this->assertEqual($result_count, 4, 'Option 4: View has four results.');
- /* @todo: Fix and uncomment in issue #3045168.
- * // Option 5: Is all of 1 and 2.
- * $view = $this->getTermIdExposedGroupedOptionsTestView();
- * $view->set_exposed_input(array(
- * 'field_tags_tid' => '5',
- * ));
- * $this->executeView($view);
- *
- * // Assert correct result set.
- * $result_count = isset($view->result) && is_array($view->result) ? count($view->result) : 0;
- * $nid = isset($view->result[0]->nid) ? (int) $view->result[0]->nid : 0;
- * $this->assertIdentical($nid, (int) $this->nodes[2]->nid, 'Option 5: View result has correct node ID.');
- * $this->assertIdentical($result_count, 1, 'Option 5: View has one result.');
- */
- // Option 6: Is empty.
- $view = $this->getTermIdExposedGroupedOptionsTestView();
- $view->set_exposed_input(array(
- 'field_tags_tid' => '6',
- ));
- $this->executeView($view);
- // Assert correct result set.
- $result_count = isset($view->result) && is_array($view->result) ? count($view->result) : 1;
- $this->assertIdentical($result_count, 0, 'Option 6: View has empty result.');
- // Option 7: Is not empty.
- $view = $this->getTermIdExposedGroupedOptionsTestView();
- $view->set_exposed_input(array(
- 'field_tags_tid' => '7',
- ));
- $this->executeView($view);
- // Assert correct result set.
- $result_count = isset($view->result) && is_array($view->result) ? count($view->result) : 0;
- $nid = isset($view->result[0]->nid) ? (int) $view->result[0]->nid : 0;
- $result1 = ($nid === (int) $this->nodes[0]->nid);
- $nid = isset($view->result[1]->nid) ? (int) $view->result[1]->nid : 0;
- $result2 = ($nid === (int) $this->nodes[1]->nid);
- $nid = isset($view->result[2]->nid) ? (int) $view->result[2]->nid : 0;
- $result3 = ($nid === (int) $this->nodes[2]->nid);
- $nid = isset($view->result[3]->nid) ? (int) $view->result[3]->nid : 0;
- $result4 = ($nid === (int) $this->nodes[2]->nid);
- $this->assertTrue($result1 && $result2 && $result3 && $result4, 'Option 7: View result has correct node ID.');
- $this->verbose($view->result);
- $this->assertIdentical($result_count, 4, 'Option 7: View has four results.');
- }
- /**
- * Generates test_not view.
- */
- protected function getGroupedNoneOfTestView() {
- $view = new view();
- $view->name = 'test_not';
- $view->description = '';
- $view->tag = 'default';
- $view->base_table = 'node';
- $view->human_name = 'test_not';
- $view->core = 7;
- $view->api_version = '3.0';
- $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
- /* Display: Master */
- $handler = $view->new_display('default', 'Master', 'default');
- $handler->display->display_options['use_more_always'] = FALSE;
- $handler->display->display_options['access']['type'] = 'perm';
- $handler->display->display_options['cache']['type'] = 'none';
- $handler->display->display_options['query']['type'] = 'views_query';
- $handler->display->display_options['exposed_form']['type'] = 'basic';
- $handler->display->display_options['pager']['type'] = 'full';
- $handler->display->display_options['style_plugin'] = 'default';
- $handler->display->display_options['row_plugin'] = 'fields';
- /* Field: Content: Title */
- $handler->display->display_options['fields']['title']['id'] = 'title';
- $handler->display->display_options['fields']['title']['table'] = 'node';
- $handler->display->display_options['fields']['title']['field'] = 'title';
- $handler->display->display_options['fields']['title']['label'] = '';
- $handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
- $handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
- /* Sort criterion: Content: Nid */
- $handler->display->display_options['sorts']['nid']['id'] = 'nid';
- $handler->display->display_options['sorts']['nid']['table'] = 'node';
- $handler->display->display_options['sorts']['nid']['field'] = 'nid';
- $handler->display->display_options['filter_groups']['operator'] = 'OR';
- $handler->display->display_options['filter_groups']['groups'] = array(
- 1 => 'AND',
- 2 => 'AND',
- );
- /* Filter criterion: Content: Published */
- $handler->display->display_options['filters']['status']['id'] = 'status';
- $handler->display->display_options['filters']['status']['table'] = 'node';
- $handler->display->display_options['filters']['status']['field'] = 'status';
- $handler->display->display_options['filters']['status']['value'] = 1;
- $handler->display->display_options['filters']['status']['group'] = 1;
- $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
- /* Filter criterion: Content: Type */
- $handler->display->display_options['filters']['type']['id'] = 'type';
- $handler->display->display_options['filters']['type']['table'] = 'node';
- $handler->display->display_options['filters']['type']['field'] = 'type';
- $handler->display->display_options['filters']['type']['value'] = array(
- 'article' => 'article',
- );
- $handler->display->display_options['filters']['type']['group'] = 1;
- /* Filter criterion: Field: field_bool (field_bool) */
- $handler->display->display_options['filters']['field_bool_value']['id'] = 'field_bool_value';
- $handler->display->display_options['filters']['field_bool_value']['table'] = 'field_data_field_bool';
- $handler->display->display_options['filters']['field_bool_value']['field'] = 'field_bool_value';
- $handler->display->display_options['filters']['field_bool_value']['operator'] = 'not';
- $handler->display->display_options['filters']['field_bool_value']['value'] = array(
- 1 => '1',
- );
- $handler->display->display_options['filters']['field_bool_value']['group'] = 1;
- /* Filter criterion: Field: field_bool (field_bool) */
- $handler->display->display_options['filters']['field_bool_value_1']['id'] = 'field_bool_value_1';
- $handler->display->display_options['filters']['field_bool_value_1']['table'] = 'field_data_field_bool';
- $handler->display->display_options['filters']['field_bool_value_1']['field'] = 'field_bool_value';
- $handler->display->display_options['filters']['field_bool_value_1']['operator'] = 'not';
- $handler->display->display_options['filters']['field_bool_value_1']['value'] = array(
- 1 => '1',
- );
- $handler->display->display_options['filters']['field_bool_value_1']['group'] = 2;
- /* Filter criterion: Content: Type */
- $handler->display->display_options['filters']['type_1']['id'] = 'type_1';
- $handler->display->display_options['filters']['type_1']['table'] = 'node';
- $handler->display->display_options['filters']['type_1']['field'] = 'type';
- $handler->display->display_options['filters']['type_1']['value'] = array(
- 'article' => 'article',
- );
- $handler->display->display_options['filters']['type_1']['group'] = 2;
- /* Filter criterion: Content: Published */
- $handler->display->display_options['filters']['status_1']['id'] = 'status_1';
- $handler->display->display_options['filters']['status_1']['table'] = 'node';
- $handler->display->display_options['filters']['status_1']['field'] = 'status';
- $handler->display->display_options['filters']['status_1']['value'] = '1';
- $handler->display->display_options['filters']['status_1']['group'] = 2;
- return $view;
- }
- /**
- * Generates test_oneof view.
- */
- protected function getGroupedOneOfTestView() {
- $view = new view();
- $view->name = 'test_oneof';
- $view->description = '';
- $view->tag = 'default';
- $view->base_table = 'node';
- $view->human_name = 'test_oneof';
- $view->core = 7;
- $view->api_version = '3.0';
- $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
- /* Display: Master */
- $handler = $view->new_display('default', 'Master', 'default');
- $handler->display->display_options['use_more_always'] = FALSE;
- $handler->display->display_options['access']['type'] = 'perm';
- $handler->display->display_options['cache']['type'] = 'none';
- $handler->display->display_options['query']['type'] = 'views_query';
- $handler->display->display_options['exposed_form']['type'] = 'basic';
- $handler->display->display_options['pager']['type'] = 'full';
- $handler->display->display_options['style_plugin'] = 'default';
- $handler->display->display_options['row_plugin'] = 'fields';
- /* Field: Content: Title */
- $handler->display->display_options['fields']['title']['id'] = 'title';
- $handler->display->display_options['fields']['title']['table'] = 'node';
- $handler->display->display_options['fields']['title']['field'] = 'title';
- $handler->display->display_options['fields']['title']['label'] = '';
- $handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
- $handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
- /* Sort criterion: Content: Nid */
- $handler->display->display_options['sorts']['nid']['id'] = 'nid';
- $handler->display->display_options['sorts']['nid']['table'] = 'node';
- $handler->display->display_options['sorts']['nid']['field'] = 'nid';
- $handler->display->display_options['filter_groups']['operator'] = 'OR';
- $handler->display->display_options['filter_groups']['groups'] = array(
- 1 => 'AND',
- 2 => 'AND',
- );
- /* Filter criterion: Content: Tags (field_tags) */
- $handler->display->display_options['filters']['field_tags_tid']['id'] = 'field_tags_tid';
- $handler->display->display_options['filters']['field_tags_tid']['table'] = 'field_data_field_tags';
- $handler->display->display_options['filters']['field_tags_tid']['field'] = 'field_tags_tid';
- $handler->display->display_options['filters']['field_tags_tid']['value'] = array(
- 1 => '1',
- );
- $handler->display->display_options['filters']['field_tags_tid']['group'] = 2;
- $handler->display->display_options['filters']['field_tags_tid']['reduce_duplicates'] = TRUE;
- $handler->display->display_options['filters']['field_tags_tid']['type'] = 'select';
- $handler->display->display_options['filters']['field_tags_tid']['vocabulary'] = 'tags';
- /* Filter criterion: Content: Tags (field_tags) */
- $handler->display->display_options['filters']['field_tags_tid_1']['id'] = 'field_tags_tid_1';
- $handler->display->display_options['filters']['field_tags_tid_1']['table'] = 'field_data_field_tags';
- $handler->display->display_options['filters']['field_tags_tid_1']['field'] = 'field_tags_tid';
- $handler->display->display_options['filters']['field_tags_tid_1']['value'] = array(
- 1 => '1',
- );
- $handler->display->display_options['filters']['field_tags_tid_1']['reduce_duplicates'] = TRUE;
- $handler->display->display_options['filters']['field_tags_tid_1']['type'] = 'select';
- $handler->display->display_options['filters']['field_tags_tid_1']['vocabulary'] = 'tags';
- return $view;
- }
- /**
- * Generates test_reduced_exposed_grouped_options view.
- */
- protected function getReducedExposedGroupedOptionsTestView() {
- $view = new view();
- $view->name = 'test_reduced_exposed_grouped_options';
- $view->description = '';
- $view->tag = 'default';
- $view->base_table = 'node';
- $view->human_name = 'test_reduced_exposed_grouped_options';
- $view->core = 7;
- $view->api_version = '3.0';
- $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
- /* Display: Master */
- $handler = $view->new_display('default', 'Master', 'default');
- $handler->display->display_options['use_more_always'] = FALSE;
- $handler->display->display_options['access']['type'] = 'perm';
- $handler->display->display_options['cache']['type'] = 'none';
- $handler->display->display_options['query']['type'] = 'views_query';
- $handler->display->display_options['exposed_form']['type'] = 'basic';
- $handler->display->display_options['pager']['type'] = 'full';
- $handler->display->display_options['style_plugin'] = 'default';
- $handler->display->display_options['row_plugin'] = 'fields';
- /* Field: Content: Title */
- $handler->display->display_options['fields']['title']['id'] = 'title';
- $handler->display->display_options['fields']['title']['table'] = 'node';
- $handler->display->display_options['fields']['title']['field'] = 'title';
- $handler->display->display_options['fields']['title']['label'] = '';
- $handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
- $handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
- /* Sort criterion: Content: Nid */
- $handler->display->display_options['sorts']['nid']['id'] = 'nid';
- $handler->display->display_options['sorts']['nid']['table'] = 'node';
- $handler->display->display_options['sorts']['nid']['field'] = 'nid';
- /* Filter criterion: Content: Published */
- $handler->display->display_options['filters']['status']['id'] = 'status';
- $handler->display->display_options['filters']['status']['table'] = 'node';
- $handler->display->display_options['filters']['status']['field'] = 'status';
- $handler->display->display_options['filters']['status']['value'] = 1;
- $handler->display->display_options['filters']['status']['group'] = 1;
- $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
- /* Filter criterion: Content: list (field_list) */
- $handler->display->display_options['filters']['field_list_value']['id'] = 'field_list_value';
- $handler->display->display_options['filters']['field_list_value']['table'] = 'field_data_field_list';
- $handler->display->display_options['filters']['field_list_value']['field'] = 'field_list_value';
- $handler->display->display_options['filters']['field_list_value']['exposed'] = TRUE;
- $handler->display->display_options['filters']['field_list_value']['expose']['operator_id'] = 'field_list_value_op';
- $handler->display->display_options['filters']['field_list_value']['expose']['label'] = 'list (field_list)';
- $handler->display->display_options['filters']['field_list_value']['expose']['operator'] = 'field_list_value_op';
- $handler->display->display_options['filters']['field_list_value']['expose']['identifier'] = 'field_list_value';
- $handler->display->display_options['filters']['field_list_value']['is_grouped'] = TRUE;
- $handler->display->display_options['filters']['field_list_value']['group_info']['label'] = 'list (field_list)';
- $handler->display->display_options['filters']['field_list_value']['group_info']['identifier'] = 'field_list_value';
- $handler->display->display_options['filters']['field_list_value']['group_info']['group_items'] = array(
- 1 => array(
- 'title' => 'Not 1 or 2',
- 'operator' => 'not',
- 'value' => array(
- 1 => '1',
- 2 => '2',
- ),
- ),
- 2 => array(
- 'title' => '1',
- 'operator' => 'or',
- 'value' => array(
- 1 => '1',
- ),
- ),
- 3 => array(
- 'title' => '1 or 2',
- 'operator' => 'or',
- 'value' => array(
- 1 => '1',
- 2 => '2',
- ),
- ),
- 4 => array(
- 'title' => '1 and 2',
- 'operator' => 'and',
- 'value' => array(
- 1 => '1',
- 2 => '2',
- ),
- ),
- 5 => array(
- 'title' => 'empty',
- 'operator' => 'empty',
- 'value' => array(),
- ),
- 6 => array(
- 'title' => 'not empty',
- 'operator' => 'not empty',
- 'value' => array(),
- ),
- );
- return $view;
- }
- /**
- * Generates test_tid_exposed_grouped_options view.
- */
- protected function getTermIdExposedGroupedOptionsTestView() {
- $view = new view();
- $view->name = 'test_tid_exposed_grouped_options';
- $view->description = '';
- $view->tag = 'default';
- $view->base_table = 'node';
- $view->human_name = 'test_tid_exposed_grouped_options';
- $view->core = 7;
- $view->api_version = '3.0';
- $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
- /* Display: Master */
- $handler = $view->new_display('default', 'Master', 'default');
- $handler->display->display_options['use_more_always'] = FALSE;
- $handler->display->display_options['access']['type'] = 'perm';
- $handler->display->display_options['cache']['type'] = 'none';
- $handler->display->display_options['query']['type'] = 'views_query';
- $handler->display->display_options['exposed_form']['type'] = 'basic';
- $handler->display->display_options['pager']['type'] = 'full';
- $handler->display->display_options['style_plugin'] = 'default';
- $handler->display->display_options['row_plugin'] = 'fields';
- /* Field: Content: Title */
- $handler->display->display_options['fields']['title']['id'] = 'title';
- $handler->display->display_options['fields']['title']['table'] = 'node';
- $handler->display->display_options['fields']['title']['field'] = 'title';
- $handler->display->display_options['fields']['title']['label'] = '';
- $handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
- $handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
- /* Sort criterion: Content: Nid */
- $handler->display->display_options['sorts']['nid']['id'] = 'nid';
- $handler->display->display_options['sorts']['nid']['table'] = 'node';
- $handler->display->display_options['sorts']['nid']['field'] = 'nid';
- /* Filter criterion: Content: Published */
- $handler->display->display_options['filters']['status']['id'] = 'status';
- $handler->display->display_options['filters']['status']['table'] = 'node';
- $handler->display->display_options['filters']['status']['field'] = 'status';
- $handler->display->display_options['filters']['status']['value'] = 1;
- $handler->display->display_options['filters']['status']['group'] = 1;
- $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
- /* Filter criterion: Content: Tags (field_tags) */
- $handler->display->display_options['filters']['field_tags_tid']['id'] = 'field_tags_tid';
- $handler->display->display_options['filters']['field_tags_tid']['table'] = 'field_data_field_tags';
- $handler->display->display_options['filters']['field_tags_tid']['field'] = 'field_tags_tid';
- $handler->display->display_options['filters']['field_tags_tid']['value'] = array(
- 1 => '1',
- 2 => '2',
- );
- $handler->display->display_options['filters']['field_tags_tid']['exposed'] = TRUE;
- $handler->display->display_options['filters']['field_tags_tid']['expose']['operator_id'] = 'field_tags_tid_op';
- $handler->display->display_options['filters']['field_tags_tid']['expose']['label'] = 'Tags (field_tags)';
- $handler->display->display_options['filters']['field_tags_tid']['expose']['operator'] = 'field_tags_tid_op';
- $handler->display->display_options['filters']['field_tags_tid']['expose']['identifier'] = 'field_tags_tid';
- $handler->display->display_options['filters']['field_tags_tid']['expose']['remember_roles'] = array(
- 2 => '2',
- );
- $handler->display->display_options['filters']['field_tags_tid']['is_grouped'] = TRUE;
- $handler->display->display_options['filters']['field_tags_tid']['group_info']['label'] = 'Tags (field_tags)';
- $handler->display->display_options['filters']['field_tags_tid']['group_info']['identifier'] = 'field_tags_tid';
- $handler->display->display_options['filters']['field_tags_tid']['group_info']['group_items'] = array(
- 1 => array(
- 'title' => 'Is none of 2',
- 'operator' => 'not',
- 'value' => array(
- 2 => '2',
- ),
- ),
- 2 => array(
- 'title' => 'Is none of 1 or 2',
- 'operator' => 'not',
- 'value' => array(
- 1 => '1',
- 2 => '2',
- ),
- ),
- 3 => array(
- 'title' => 'Is one of 1',
- 'operator' => 'or',
- 'value' => array(
- 1 => '1',
- ),
- ),
- 4 => array(
- 'title' => 'Is one of 1 or 2',
- 'operator' => 'or',
- 'value' => array(
- 1 => '1',
- 2 => '2',
- ),
- ),
- 5 => array(
- 'title' => 'Is all of 1 and 2',
- 'operator' => 'and',
- 'value' => array(
- 1 => '1',
- 2 => '2',
- ),
- ),
- 6 => array(
- 'title' => 'Is empty',
- 'operator' => 'empty',
- 'value' => array(
- 1 => '1',
- 2 => '2',
- ),
- ),
- 7 => array(
- 'title' => 'Is not empty',
- 'operator' => 'not empty',
- 'value' => array(
- 1 => '1',
- 2 => '2',
- ),
- ),
- );
- $handler->display->display_options['filters']['field_tags_tid']['type'] = 'select';
- $handler->display->display_options['filters']['field_tags_tid']['vocabulary'] = 'tags';
- return $view;
- }
- /**
- * Generates test_join_limit_none_of view.
- */
- protected function getJoinLimitNoneOfTestView() {
- $view = new view();
- $view->name = 'test_join_limit_none_of';
- $view->description = '';
- $view->tag = 'default';
- $view->base_table = 'node';
- $view->human_name = 'test_join_limit_none_of';
- $view->core = 7;
- $view->api_version = '3.0';
- $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
- /* Display: Master */
- $handler = $view->new_display('default', 'Master', 'default');
- $handler->display->display_options['use_more_always'] = FALSE;
- $handler->display->display_options['access']['type'] = 'perm';
- $handler->display->display_options['cache']['type'] = 'none';
- $handler->display->display_options['query']['type'] = 'views_query';
- $handler->display->display_options['exposed_form']['type'] = 'basic';
- $handler->display->display_options['pager']['type'] = 'full';
- $handler->display->display_options['style_plugin'] = 'default';
- $handler->display->display_options['row_plugin'] = 'fields';
- /* Field: Content: Title */
- $handler->display->display_options['fields']['title']['id'] = 'title';
- $handler->display->display_options['fields']['title']['table'] = 'node';
- $handler->display->display_options['fields']['title']['field'] = 'title';
- $handler->display->display_options['fields']['title']['label'] = '';
- $handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
- $handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
- /* Sort criterion: Content: Post date */
- $handler->display->display_options['sorts']['created']['id'] = 'created';
- $handler->display->display_options['sorts']['created']['table'] = 'node';
- $handler->display->display_options['sorts']['created']['field'] = 'created';
- $handler->display->display_options['sorts']['created']['order'] = 'DESC';
- /* Filter criterion: Content: Published */
- $handler->display->display_options['filters']['status']['id'] = 'status';
- $handler->display->display_options['filters']['status']['table'] = 'node';
- $handler->display->display_options['filters']['status']['field'] = 'status';
- $handler->display->display_options['filters']['status']['value'] = 1;
- $handler->display->display_options['filters']['status']['group'] = 1;
- $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
- /* Filter criterion: Content: Tags (field_tags) */
- $handler->display->display_options['filters']['field_tags_tid']['id'] = 'field_tags_tid';
- $handler->display->display_options['filters']['field_tags_tid']['table'] = 'field_data_field_tags';
- $handler->display->display_options['filters']['field_tags_tid']['field'] = 'field_tags_tid';
- $handler->display->display_options['filters']['field_tags_tid']['operator'] = 'not';
- $handler->display->display_options['filters']['field_tags_tid']['value'] = array(
- 2 => '2',
- 3 => '3',
- 4 => '4',
- 5 => '5',
- 6 => '6',
- 7 => '7',
- 8 => '8',
- 9 => '9',
- 10 => '10',
- 11 => '11',
- 12 => '12',
- 13 => '13',
- 14 => '14',
- 15 => '15',
- 16 => '16',
- 17 => '17',
- 18 => '18',
- 19 => '19',
- 20 => '20',
- 21 => '21',
- 22 => '22',
- 23 => '23',
- 24 => '24',
- 25 => '25',
- 26 => '26',
- 27 => '27',
- 28 => '28',
- 29 => '29',
- 30 => '30',
- 31 => '31',
- 32 => '32',
- 33 => '33',
- 34 => '34',
- 35 => '35',
- 36 => '36',
- 37 => '37',
- 38 => '38',
- 39 => '39',
- 40 => '40',
- 41 => '41',
- 42 => '42',
- 43 => '43',
- 44 => '44',
- 45 => '45',
- 46 => '46',
- 47 => '47',
- 48 => '48',
- 49 => '49',
- 50 => '50',
- 51 => '51',
- 52 => '52',
- 53 => '53',
- 54 => '54',
- 55 => '55',
- 56 => '56',
- 57 => '57',
- 58 => '58',
- 59 => '59',
- 60 => '60',
- 61 => '61',
- 62 => '62',
- 63 => '63',
- 64 => '64',
- 65 => '65',
- 66 => '66',
- 67 => '67',
- 68 => '68',
- 69 => '69',
- 61 => '61',
- 62 => '62',
- );
- $handler->display->display_options['filters']['field_tags_tid']['type'] = 'select';
- $handler->display->display_options['filters']['field_tags_tid']['vocabulary'] = 'tags';
- return $view;
- }
- }
|