protected function ViewsUiBaseViewsWizard::default_display_options

3.x views_ui_base_views_wizard.class.php protected ViewsUiBaseViewsWizard::default_display_options($form, $form_state)

Most subclasses will need to override this method to provide some fields or a different row plugin.

6 calls to ViewsUiBaseViewsWizard::default_display_options()
ViewsUiBaseViewsWizard::build_display_options in plugins/views_wizard/views_ui_base_views_wizard.class.php
Build an array of display options for the view.
ViewsUiCommentViewsWizard::default_display_options in plugins/views_wizard/views_ui_comment_views_wizard.class.php
Most subclasses will need to override this method to provide some fields or a different row plugin.
ViewsUiFileManagedViewsWizard::default_display_options in plugins/views_wizard/views_ui_file_managed_views_wizard.class.php
Most subclasses will need to override this method to provide some fields or a different row plugin.
ViewsUiNodeViewsWizard::default_display_options in plugins/views_wizard/views_ui_node_views_wizard.class.php
@override
ViewsUiTaxonomyTermViewsWizard::default_display_options in plugins/views_wizard/views_ui_taxonomy_term_views_wizard.class.php
Most subclasses will need to override this method to provide some fields or a different row plugin.

... See full list

5 methods override ViewsUiBaseViewsWizard::default_display_options()
ViewsUiCommentViewsWizard::default_display_options in plugins/views_wizard/views_ui_comment_views_wizard.class.php
Most subclasses will need to override this method to provide some fields or a different row plugin.
ViewsUiFileManagedViewsWizard::default_display_options in plugins/views_wizard/views_ui_file_managed_views_wizard.class.php
Most subclasses will need to override this method to provide some fields or a different row plugin.
ViewsUiNodeViewsWizard::default_display_options in plugins/views_wizard/views_ui_node_views_wizard.class.php
@override
ViewsUiTaxonomyTermViewsWizard::default_display_options in plugins/views_wizard/views_ui_taxonomy_term_views_wizard.class.php
Most subclasses will need to override this method to provide some fields or a different row plugin.
ViewsUiUsersViewsWizard::default_display_options in plugins/views_wizard/views_ui_users_views_wizard.class.php
Most subclasses will need to override this method to provide some fields or a different row plugin.

File

plugins/views_wizard/views_ui_base_views_wizard.class.php, line 615
Provides the interface and base class for Views Wizard plugins.

Class

ViewsUiBaseViewsWizard
A very generic Views Wizard class - can be constructed for any base table.

Code

protected function default_display_options($form, $form_state) {
  $display_options = array();
  $display_options['access']['type'] = 'none';
  $display_options['cache']['type'] = 'none';
  $display_options['query']['type'] = 'views_query';
  $display_options['exposed_form']['type'] = 'basic';
  $display_options['pager']['type'] = 'full';
  $display_options['style_plugin'] = 'default';
  $display_options['row_plugin'] = 'fields';

  // Add a least one field so the view validates and the user has already a preview.
  // Therefore the basefield could provide 'defaults][field]' in it's base settings.
  // If there is nothing like this choose the first field with a field handler.
  $data = views_fetch_data($this->base_table);
  if (isset($data['table']['base']['defaults']['field'])) {
    $field = $data['table']['base']['defaults']['field'];
  }
  else {
    foreach ($data as $field => $field_data) {
      if (isset($field_data['field']['handler'])) {
        break;
      }
    }
  }
  $display_options['fields'][$field] = array(
    'table' => $this->base_table,
    'field' => $field,
    'id' => $field,
  );

  return $display_options;
}