protected function ViewsUiBaseViewsWizard::page_display_options

3.x views_ui_base_views_wizard.class.php protected ViewsUiBaseViewsWizard::page_display_options($form, $form_state)
3 calls to ViewsUiBaseViewsWizard::page_display_options()
2 methods override ViewsUiBaseViewsWizard::page_display_options()

File

plugins/views_wizard/views_ui_base_views_wizard.class.php, line 769
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;
}