You are here

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

Gets all the plugins used by the display.

Parameters

bool $only_overrides: Whether to include only overridden plugins.

Return value

\Drupal\views\Plugin\views\ViewsPluginInterface[]

1 call to DisplayPluginBase::getAllPlugins()
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 936

Class

DisplayPluginBase
Base class for views display plugins.

Namespace

Drupal\views\Plugin\views\display

Code

protected function getAllPlugins($only_overrides = FALSE) {
  $plugins = [];

  // Collect all dependencies of plugins.
  foreach (Views::getPluginTypes('plugin') as $plugin_type) {
    $plugin = $this
      ->getPlugin($plugin_type);
    if (!$plugin) {
      continue;
    }
    if ($only_overrides && $this
      ->isDefaulted($plugin_type)) {
      continue;
    }
    $plugins[] = $plugin;
  }
  return $plugins;
}