protected function RangeViewsArgumentTestCase::getRangeSearchApiViewsArgumentTestView in Range 7
Returns view for testing range search API views argument.
Return value
view View object.
1 call to RangeViewsArgumentTestCase::getRangeSearchApiViewsArgumentTestView()
- RangeViewsArgumentTestCase::testRangeSearchApiViewsArgument in tests/
views/ range.views.argument.test - Tests range search API views argument.
File
- tests/
views/ range.views.argument.test, line 150 - Contains range views argument handler test class.
Class
- RangeViewsArgumentTestCase
- Tests range views argument handler.
Code
protected function getRangeSearchApiViewsArgumentTestView() {
$view = new view();
$view->name = 'test_range_search_api_argument';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'search_api_index_test_index';
$view->human_name = 'test_range_search_api_argument';
$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'] = 'none';
$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: Indexed Node: Node ID */
$handler->display->display_options['fields']['nid']['id'] = 'nid';
$handler->display->display_options['fields']['nid']['table'] = 'search_api_index_test_index';
$handler->display->display_options['fields']['nid']['field'] = 'nid';
$handler->display->display_options['fields']['nid']['label'] = '';
$handler->display->display_options['fields']['nid']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['nid']['link_to_entity'] = 0;
/* Sort criterion: Indexed Node: Entity ID */
$handler->display->display_options['sorts']['search_api_id']['id'] = 'search_api_id';
$handler->display->display_options['sorts']['search_api_id']['table'] = 'search_api_index_test_index';
$handler->display->display_options['sorts']['search_api_id']['field'] = 'search_api_id';
/* Contextual filter: Indexed Node: Range integer range argument */
$handler->display->display_options['arguments']['field_range_integer']['id'] = 'field_range_integer';
$handler->display->display_options['arguments']['field_range_integer']['table'] = 'search_api_index_test_index';
$handler->display->display_options['arguments']['field_range_integer']['field'] = 'field_range_integer';
$handler->display->display_options['arguments']['field_range_integer']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['field_range_integer']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['field_range_integer']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['field_range_integer']['summary_options']['items_per_page'] = '25';
return $view;
}