function DisplayPluginBase::getAllPlugins

Same name in other branches
  1. 8.9.x core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::getAllPlugins()
  2. 10 core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::getAllPlugins()
  3. 11.x 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 935

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;
}

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