You are here

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

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

Overrides DisplayPluginBase::defaultableSections

File

lib/Drupal/views/Plugin/views/display/Feed.php, line 94
Definition of Drupal\views\Plugin\views\display\Feed.

Class

Feed
The plugin that handles a feed, such as RSS or atom.

Namespace

Drupal\views\Plugin\views\display

Code

public function defaultableSections($section = NULL) {
  if (in_array($section, array(
    'style',
    'row',
  ))) {
    return FALSE;
  }
  $sections = parent::defaultableSections($section);

  // Tell views our sitename_title option belongs in the title section.
  if ($section == 'title') {
    $sections[] = 'sitename_title';
  }
  elseif (!$section) {
    $sections['title'][] = 'sitename_title';
  }
  return $sections;
}