function _answers_set_question_answers_view in Answers 7.4
Return the structure of the question_answers view.
1 call to _answers_set_question_answers_view()
- answers_views_default_views in ./
answers.views_default.inc - Implements hook_views_default_views().
File
- ./
answers.views_default.inc, line 294 - Views defaults for the answers module.
Code
function _answers_set_question_answers_view(&$view) {
$view->name = 'question_answers';
$view->description = t('Provide a list of !answers to a !question', answers_translation());
$view->tag = 'answers';
$view->base_table = 'node';
$view->human_name = 'Answers to a Question';
$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_ajax'] = TRUE;
$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['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '10';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['pager']['options']['id'] = '40';
$handler->display->display_options['pager']['options']['quantity'] = '9';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'node';
$handler->display->display_options['row_options']['view_mode'] = 'full';
$handler->display->display_options['row_options']['comments'] = TRUE;
/* Header: Global: Answers Count */
$handler->display->display_options['header']['answers_count']['id'] = 'answers_count';
$handler->display->display_options['header']['answers_count']['table'] = 'views';
$handler->display->display_options['header']['answers_count']['field'] = 'answers_count';
/* 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';
/* Contextual filter: Content: Related Question (answers_related_question) */
$handler->display->display_options['arguments']['answers_related_question_target_id']['id'] = 'answers_related_question_target_id';
$handler->display->display_options['arguments']['answers_related_question_target_id']['table'] = 'field_data_answers_related_question';
$handler->display->display_options['arguments']['answers_related_question_target_id']['field'] = 'answers_related_question_target_id';
$handler->display->display_options['arguments']['answers_related_question_target_id']['default_action'] = 'not found';
$handler->display->display_options['arguments']['answers_related_question_target_id']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['answers_related_question_target_id']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['answers_related_question_target_id']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['answers_related_question_target_id']['summary_options']['items_per_page'] = '25';
/* 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(
'answers_answer' => 'answers_answer',
);
}