You are here

public function DisplayPluginBase::defaultableSections in Views (for Drupal 7) 8.3

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

3 calls to DisplayPluginBase::defaultableSections()
DisplayPluginBase::buildOptionsForm in lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
Provide the default form for setting options.
DisplayPluginBase::setOverride in lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
Flip the override setting for the given section.
Feed::defaultableSections in lib/Drupal/views/Plugin/views/display/Feed.php
Static member function to list which sections are defaultable and what items each section contains.
1 method overrides DisplayPluginBase::defaultableSections()
Feed::defaultableSections in lib/Drupal/views/Plugin/views/display/Feed.php
Static member function to list which sections are defaultable and what items each section contains.

File

lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php, line 367
Definition of Drupal\views\Plugin\views\display\DisplayPluginBase.

Class

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

Namespace

Drupal\views\Plugin\views\display

Code

public function defaultableSections($section = NULL) {
  $sections = array(
    'access' => array(
      'access',
    ),
    'cache' => array(
      'cache',
    ),
    'title' => array(
      'title',
    ),
    'css_class' => array(
      'css_class',
    ),
    'use_ajax' => array(
      'use_ajax',
    ),
    'hide_attachment_summary' => array(
      'hide_attachment_summary',
    ),
    'hide_admin_links' => array(
      'hide_admin_links',
    ),
    'group_by' => array(
      'group_by',
    ),
    'query' => array(
      'query',
    ),
    'use_more' => array(
      'use_more',
      'use_more_always',
      'use_more_text',
    ),
    'use_more_always' => array(
      'use_more',
      'use_more_always',
      'use_more_text',
    ),
    'use_more_text' => array(
      'use_more',
      'use_more_always',
      'use_more_text',
    ),
    'link_display' => array(
      'link_display',
      'link_url',
    ),
    // Force these to cascade properly.
    'style' => array(
      'style',
      'row',
    ),
    'row' => array(
      'style',
      'row',
    ),
    'pager' => array(
      'pager',
      'pager_options',
    ),
    'pager_options' => array(
      'pager',
      'pager_options',
    ),
    'exposed_form' => array(
      'exposed_form',
      'exposed_form_options',
    ),
    'exposed_form_options' => array(
      'exposed_form',
      'exposed_form_options',
    ),
    // These guys are special
    'header' => array(
      'header',
    ),
    'footer' => array(
      'footer',
    ),
    'empty' => array(
      'empty',
    ),
    'relationships' => array(
      'relationships',
    ),
    'fields' => array(
      'fields',
    ),
    'sorts' => array(
      'sorts',
    ),
    'arguments' => array(
      'arguments',
    ),
    'filters' => array(
      'filters',
      'filter_groups',
    ),
    'filter_groups' => array(
      'filters',
      'filter_groups',
    ),
  );

  // If the display cannot use a pager, then we cannot default it.
  if (!$this
    ->usesPager()) {
    unset($sections['pager']);
    unset($sections['items_per_page']);
  }
  foreach ($this->extender as $extender) {
    $extender
      ->defaultableSections($sections, $section);
  }
  if ($section) {
    if (!empty($sections[$section])) {
      return $sections[$section];
    }
  }
  else {
    return $sections;
  }
}