function View::mergeDefaultDisplaysOptions
Same name in other branches
- 8.9.x core/modules/views/src/Entity/View.php \Drupal\views\Entity\View::mergeDefaultDisplaysOptions()
- 10 core/modules/views/src/Entity/View.php \Drupal\views\Entity\View::mergeDefaultDisplaysOptions()
- 11.x core/modules/views/src/Entity/View.php \Drupal\views\Entity\View::mergeDefaultDisplaysOptions()
Overrides ViewEntityInterface::mergeDefaultDisplaysOptions
1 call to View::mergeDefaultDisplaysOptions()
- View::postCreate in core/
modules/ views/ src/ Entity/ View.php - Acts on a created entity before hooks are invoked.
File
-
core/
modules/ views/ src/ Entity/ View.php, line 432
Class
- View
- Defines a View configuration entity class.
Namespace
Drupal\views\EntityCode
public function mergeDefaultDisplaysOptions() {
$displays = [];
foreach ($this->get('display') as $key => $options) {
$options += [
'display_options' => [],
'display_plugin' => NULL,
'id' => NULL,
'display_title' => '',
'position' => NULL,
];
// Add the defaults for the display.
$displays[$key] = $options;
}
$this->set('display', $displays);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.