function DisplayPluginBase::defaultableSections
Same name in other branches
- 9 core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::defaultableSections()
- 8.9.x core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::defaultableSections()
- 10 core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::defaultableSections()
Overrides DisplayPluginInterface::defaultableSections
2 calls to DisplayPluginBase::defaultableSections()
- DisplayPluginBase::buildOptionsForm in core/
modules/ views/ src/ Plugin/ views/ display/ DisplayPluginBase.php - Provide a form to edit options for this plugin.
- DisplayPluginBase::setOverride in core/
modules/ views/ src/ Plugin/ views/ display/ DisplayPluginBase.php - Flip the override setting for the given section.
1 method overrides DisplayPluginBase::defaultableSections()
- Feed::defaultableSections in core/
modules/ views/ src/ Plugin/ views/ display/ Feed.php - Lists the 'defaultable' sections and what items each section contains.
File
-
core/
modules/ views/ src/ Plugin/ views/ display/ DisplayPluginBase.php, line 411
Class
- DisplayPluginBase
- Base class for views display plugins.
Namespace
Drupal\views\Plugin\views\displayCode
public function defaultableSections($section = NULL) {
$sections = [
'access' => [
'access',
],
'cache' => [
'cache',
],
'title' => [
'title',
],
'css_class' => [
'css_class',
],
'use_ajax' => [
'use_ajax',
],
'hide_attachment_summary' => [
'hide_attachment_summary',
],
'show_admin_links' => [
'show_admin_links',
],
'group_by' => [
'group_by',
],
'query' => [
'query',
],
'use_more' => [
'use_more',
'use_more_always',
'use_more_text',
],
'use_more_always' => [
'use_more',
'use_more_always',
'use_more_text',
],
'use_more_text' => [
'use_more',
'use_more_always',
'use_more_text',
],
'link_display' => [
'link_display',
'link_url',
],
// Force these to cascade properly.
'style' => [
'style',
'row',
],
'row' => [
'style',
'row',
],
'pager' => [
'pager',
],
'exposed_form' => [
'exposed_form',
],
// These sections are special.
'header' => [
'header',
],
'footer' => [
'footer',
],
'empty' => [
'empty',
],
'relationships' => [
'relationships',
],
'fields' => [
'fields',
],
'sorts' => [
'sorts',
],
'arguments' => [
'arguments',
],
'filters' => [
'filters',
'filter_groups',
],
'filter_groups' => [
'filters',
'filter_groups',
],
];
// If the display cannot use a pager, then we cannot default it.
if (!$this->usesPager()) {
unset($sections['pager']);
}
foreach ($this->extenders as $extender) {
$extender->defaultableSections($sections, $section);
}
if ($section) {
if (!empty($sections[$section])) {
return $sections[$section];
}
}
else {
return $sections;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.