public function View::mergeDefaultDisplaysOptions in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Entity/View.php \Drupal\views\Entity\View::mergeDefaultDisplaysOptions()
Add defaults to the display options.
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 431 - Contains \Drupal\views\Entity\View.
Class
- View
- Defines a View configuration entity class.
Namespace
Drupal\views\EntityCode
public function mergeDefaultDisplaysOptions() {
$displays = array();
foreach ($this
->get('display') as $key => $options) {
$options += array(
'display_options' => array(),
'display_plugin' => NULL,
'id' => NULL,
'display_title' => '',
'position' => NULL,
);
// Add the defaults for the display.
$displays[$key] = $options;
}
$this
->set('display', $displays);
}