You are here

function views_plugin_display::defaultable_sections in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 6.3 plugins/views_plugin_display.inc \views_plugin_display::defaultable_sections()
  2. 7.3 plugins/views_plugin_display.inc \views_plugin_display::defaultable_sections()

Static member function to list which sections are defaultable and what items each section contains.

3 calls to views_plugin_display::defaultable_sections()
views_plugin_display::options_form in plugins/views_plugin_display.inc
Provide the default form for setting options.
views_plugin_display::set_override in plugins/views_plugin_display.inc
Flip the override setting for the given section.
views_plugin_display_feed::defaultable_sections in plugins/views_plugin_display_feed.inc
Static member function to list which sections are defaultable and what items each section contains.
1 method overrides views_plugin_display::defaultable_sections()
views_plugin_display_feed::defaultable_sections in plugins/views_plugin_display_feed.inc
Static member function to list which sections are defaultable and what items each section contains.

File

plugins/views_plugin_display.inc, line 174
Contains the base display plugin.

Class

views_plugin_display
The default display plugin handler. Display plugins handle options and basic mechanisms for different output methods.

Code

function defaultable_sections($section = NULL) {
  $sections = array(
    'access' => array(
      'access',
    ),
    'cache' => array(
      'cache',
    ),
    'title' => array(
      'title',
    ),
    'css_class' => array(
      'css_class',
    ),
    'header' => array(
      'header',
      'header_format',
      'header_empty',
    ),
    'footer' => array(
      'footer',
      'footer_format',
      'footer_empty',
    ),
    'empty' => array(
      'empty',
      'empty_format',
    ),
    'use_ajax' => array(
      'use_ajax',
    ),
    'items_per_page' => array(
      'items_per_page',
      'offset',
      'use_pager',
      'pager_element',
    ),
    'use_pager' => array(
      'items_per_page',
      'offset',
      'use_pager',
      'pager_element',
    ),
    'use_more' => array(
      'use_more',
      'use_more_always',
      'use_more_text',
    ),
    'link_display' => array(
      'link_display',
    ),
    'distinct' => array(
      'distinct',
    ),
    'exposed_block' => array(
      'exposed_block',
    ),
    // Force these to cascade properly.
    'style_plugin' => array(
      'style_plugin',
      'style_options',
      'row_plugin',
      'row_options',
    ),
    'style_options' => array(
      'style_plugin',
      'style_options',
      'row_plugin',
      'row_options',
    ),
    'row_plugin' => array(
      'style_plugin',
      'style_options',
      'row_plugin',
      'row_options',
    ),
    'row_options' => array(
      'style_plugin',
      'style_options',
      'row_plugin',
      'row_options',
    ),
    // These guys are special
    'relationships' => array(
      'relationships',
    ),
    'fields' => array(
      'fields',
    ),
    'sorts' => array(
      'sorts',
    ),
    'arguments' => array(
      'arguments',
    ),
    'filters' => array(
      'filters',
    ),
  );
  if ($section) {
    if (!empty($sections[$section])) {
      return $sections[$section];
    }
  }
  else {
    return $sections;
  }
}