interface PluginManagerInterface

Same name in other branches
  1. 9 core/lib/Drupal/Component/Plugin/PluginManagerInterface.php \Drupal\Component\Plugin\PluginManagerInterface
  2. 10 core/lib/Drupal/Component/Plugin/PluginManagerInterface.php \Drupal\Component\Plugin\PluginManagerInterface
  3. 11.x core/lib/Drupal/Component/Plugin/PluginManagerInterface.php \Drupal\Component\Plugin\PluginManagerInterface

Interface implemented by plugin managers.

There are no explicit methods on the manager interface. Instead plugin managers broker the interactions of the different plugin components, and therefore, must implement each component interface, which is enforced by this interface extending all of the component ones.

While a plugin manager may directly implement these interface methods with custom logic, it is expected to be more common for plugin managers to proxy the method invocations to the respective components, and directly implement only the additional functionality needed by the specific pluggable system. To follow this pattern, plugin managers can extend from the PluginManagerBase class, which contains the proxying logic.

Hierarchy

  • interface \Drupal\Component\Plugin\Discovery\DiscoveryInterface; interface \Drupal\Component\Plugin\Factory\FactoryInterface; interface \Drupal\Component\Plugin\Mapper\MapperInterface
    • interface \Drupal\Component\Plugin\PluginManagerInterface extends \Drupal\Component\Plugin\Discovery\DiscoveryInterface \Drupal\Component\Plugin\Factory\FactoryInterface \Drupal\Component\Plugin\Mapper\MapperInterface

Expanded class hierarchy of PluginManagerInterface

All classes that implement PluginManagerInterface

See also

\Drupal\Component\Plugin\PluginManagerBase

Related topics

42 files declare their use of PluginManagerInterface
BlockPluginCollection.php in core/modules/block/src/BlockPluginCollection.php
ConfigEntityBaseUnitTest.php in core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php
Contains \Drupal\Tests\Core\Config\Entity\ConfigEntityBaseUnitTest.
ConfigMapperManagerInterface.php in core/modules/config_translation/src/ConfigMapperManagerInterface.php
ContextAwarePluginManagerInterface.php in core/lib/Drupal/Core/Plugin/Context/ContextAwarePluginManagerInterface.php
D6TermNodeDeriver.php in core/modules/taxonomy/src/Plugin/migrate/D6TermNodeDeriver.php

... See full list

File

core/lib/Drupal/Component/Plugin/PluginManagerInterface.php, line 28

Namespace

Drupal\Component\Plugin
View source
interface PluginManagerInterface extends DiscoveryInterface, FactoryInterface, MapperInterface {

}

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