You are here

public function DefaultPluginManager::getDefinitions in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Plugin/DefaultPluginManager.php \Drupal\Core\Plugin\DefaultPluginManager::getDefinitions()
  2. 10 core/lib/Drupal/Core/Plugin/DefaultPluginManager.php \Drupal\Core\Plugin\DefaultPluginManager::getDefinitions()

Gets the definition of all plugins for this type.

Return value

mixed[] An array of plugin definitions (empty array if no definitions were found). Keys are plugin IDs.

Overrides DiscoveryTrait::getDefinitions

See also

\Drupal\Core\Plugin\FilteredPluginManagerInterface::getFilteredDefinitions()

27 calls to DefaultPluginManager::getDefinitions()
ActionManager::getDefinitionsByType in core/lib/Drupal/Core/Action/ActionManager.php
Gets the plugin definitions for this entity type.
ArchiverManager::getExtensions in core/lib/Drupal/Core/Archiver/ArchiverManager.php
Returns a string of supported archive extensions.
ArchiverManager::getInstance in core/lib/Drupal/Core/Archiver/ArchiverManager.php
Gets a preconfigured instance of a plugin.
BreakpointManager::getBreakpointsByGroup in core/modules/breakpoint/src/BreakpointManager.php
Gets breakpoints for the specified group.
BreakpointManager::getGroups in core/modules/breakpoint/src/BreakpointManager.php
Gets all the existing breakpoint groups.

... See full list

2 methods override DefaultPluginManager::getDefinitions()
CategorizingPluginManager::getDefinitions in core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php
Provides some test definitions to the trait.
LocalTaskManager::getDefinitions in core/lib/Drupal/Core/Menu/LocalTaskManager.php
Gets the definition of all plugins for this type.

File

core/lib/Drupal/Core/Plugin/DefaultPluginManager.php, line 172

Class

DefaultPluginManager
Base class for plugin managers.

Namespace

Drupal\Core\Plugin

Code

public function getDefinitions() {
  $definitions = $this
    ->getCachedDefinitions();
  if (!isset($definitions)) {
    $definitions = $this
      ->findDefinitions();
    $this
      ->setCachedDefinitions($definitions);
  }
  return $definitions;
}