protected function ViewsHandlerManyToOneTest::getGroupedNoneOfTestView in Views (for Drupal 7) 7.3
Generates test_not view.
1 call to ViewsHandlerManyToOneTest::getGroupedNoneOfTestView()
- ViewsHandlerManyToOneTest::testGroupedNoneOf in tests/
handlers/ views_handler_manytoone.test - Tests duplicate grouped "none of" filters on boolean field.
File
- tests/
handlers/ views_handler_manytoone.test, line 600
Class
- ViewsHandlerManyToOneTest
- Tests the many to one helper handler class.
Code
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;
}