You are here

protected function DefaultPluginManager::getDiscovery in Drupal 10

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

Gets the plugin discovery.

Return value

\Drupal\Component\Plugin\Discovery\DiscoveryInterface

Overrides PluginManagerBase::getDiscovery

3 calls to DefaultPluginManager::getDiscovery()
ConstraintManager::getDiscovery in core/lib/Drupal/Core/Validation/ConstraintManager.php
Gets the plugin discovery.
DefaultPluginManager::findDefinitions in core/lib/Drupal/Core/Plugin/DefaultPluginManager.php
Finds plugin definitions.
EntityTypeManager::findDefinitions in core/lib/Drupal/Core/Entity/EntityTypeManager.php
Finds plugin definitions.
13 methods override DefaultPluginManager::getDiscovery()
BreakpointManager::getDiscovery in core/modules/breakpoint/src/BreakpointManager.php
Gets the plugin discovery.
CKEditor5PluginManager::getDiscovery in core/modules/ckeditor5/src/Plugin/CKEditor5PluginManager.php
Gets the plugin discovery.
ConfigMapperManager::getDiscovery in core/modules/config_translation/src/ConfigMapperManager.php
Gets the plugin discovery.
ConstraintManager::getDiscovery in core/lib/Drupal/Core/Validation/ConstraintManager.php
Gets the plugin discovery.
ContextualLinkManager::getDiscovery in core/lib/Drupal/Core/Menu/ContextualLinkManager.php
Gets the plugin discovery.

... See full list

File

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

Class

DefaultPluginManager
Base class for plugin managers.

Namespace

Drupal\Core\Plugin

Code

protected function getDiscovery() {
  if (!$this->discovery) {
    $discovery = new AnnotatedClassDiscovery($this->subdir, $this->namespaces, $this->pluginDefinitionAnnotationName, $this->additionalAnnotationNamespaces);
    $this->discovery = new ContainerDerivativeDiscoveryDecorator($discovery);
  }
  return $this->discovery;
}