You are here

protected function DisplayPluginBase::getAllHandlers 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::getAllHandlers()

Gets all the handlers used by the display.

Parameters

bool $only_overrides: Whether to include only overridden handlers.

Return value

\Drupal\views\Plugin\views\ViewsHandlerInterface[]

1 call to DisplayPluginBase::getAllHandlers()
DisplayPluginBase::calculateDependencies in core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
Calculates dependencies for the configured plugin.

File

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

Class

DisplayPluginBase
Base class for views display plugins.

Namespace

Drupal\views\Plugin\views\display

Code

protected function getAllHandlers($only_overrides = FALSE) {
  $handler_types = Views::getHandlerTypes();
  $handlers = [];

  // Collect all dependencies of all handlers.
  foreach ($handler_types as $handler_type => $handler_type_info) {
    if ($only_overrides && $this
      ->isDefaulted($handler_type_info['plural'])) {
      continue;
    }
    $handlers = array_merge($handlers, array_values($this
      ->getHandlers($handler_type)));
  }
  return $handlers;
}