You are here

protected function ViewsUiBaseViewsWizard::page_display_options in Views (for Drupal 7) 7.3

3 calls to ViewsUiBaseViewsWizard::page_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::page_display_options in plugins/views_wizard/views_ui_comment_views_wizard.class.php
ViewsUiNodeViewsWizard::page_display_options in plugins/views_wizard/views_ui_node_views_wizard.class.php
2 methods override ViewsUiBaseViewsWizard::page_display_options()
ViewsUiCommentViewsWizard::page_display_options in plugins/views_wizard/views_ui_comment_views_wizard.class.php
ViewsUiNodeViewsWizard::page_display_options in plugins/views_wizard/views_ui_node_views_wizard.class.php

File

plugins/views_wizard/views_ui_base_views_wizard.class.php, line 779
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 page_display_options($form, $form_state) {
  $display_options = array();
  $page = $form_state['values']['page'];
  $display_options['title'] = $page['title'];
  $display_options['path'] = $page['path'];
  $display_options['style_plugin'] = $page['style']['style_plugin'];

  // Not every style plugin supports row style plugins.
  $display_options['row_plugin'] = isset($page['style']['row_plugin']) ? $page['style']['row_plugin'] : 'fields';
  if (empty($page['items_per_page'])) {
    $display_options['pager']['type'] = 'none';
  }
  elseif ($page['pager']) {
    $display_options['pager']['type'] = 'full';
  }
  else {
    $display_options['pager']['type'] = 'some';
  }
  $display_options['pager']['options']['items_per_page'] = $page['items_per_page'];
  if (!empty($page['link'])) {
    $display_options['menu']['type'] = 'normal';
    $display_options['menu']['title'] = $page['link_properties']['title'];
    $display_options['menu']['name'] = $page['link_properties']['menu_name'];
  }
  return $display_options;
}