You are here

protected function DisplayPluginBase::mergeHandler in Drupal 8

Same name and namespace in other branches
  1. 9 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);
}