You are here

protected function DefaultPluginManager::getFactory in Drupal 10

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

Gets the plugin factory.

Return value

\Drupal\Component\Plugin\Factory\FactoryInterface

Overrides PluginManagerBase::getFactory

2 calls to DefaultPluginManager::getFactory()
ConditionManager::createInstance in core/lib/Drupal/Core/Condition/ConditionManager.php
Creates a pre-configured instance of a plugin.
MigrationPluginManager::createInstances in core/modules/migrate/src/Plugin/MigrationPluginManager.php
Create pre-configured instance of plugin derivatives.

File

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

Class

DefaultPluginManager
Base class for plugin managers.

Namespace

Drupal\Core\Plugin

Code

protected function getFactory() {
  if (!$this->factory) {
    $this->factory = new ContainerFactory($this, $this->pluginInterface);
  }
  return $this->factory;
}