function DisplayPluginBase::mergeHandler

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::mergeHandler()
  2. 10 core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::mergeHandler()
  3. 11.x core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::mergeHandler()

Merges handlers default values.

Parameters

string $type: The name of the handler type option.

File

core/modules/views/src/Plugin/views/display/DisplayPluginBase.php, line 2722

Class

DisplayPluginBase
Base class for views display plugins.

Namespace

Drupal\views\Plugin\views\display

Code

protected function mergeHandler($type) {
    $types = ViewExecutable::getHandlerTypes();
    $options = $this->getOption($types[$type]['plural']);
    foreach ($this->getHandlers($type) as $id => $handler) {
        if (isset($options[$id])) {
            $options[$id] = $options[$id] + $handler->options;
        }
    }
    $this->setOption($types[$type]['plural'], $options);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.