You are here

class DefaultPluginManager in Service Container 7

Same name in this branch
  1. 7 src/Plugin/DefaultPluginManager.php \Drupal\service_container\Plugin\DefaultPluginManager
  2. 7 lib/Drupal/Component/Plugin/DefaultPluginManager.php \Drupal\Core\Plugin\DefaultPluginManager
Same name and namespace in other branches
  1. 7.2 src/Plugin/DefaultPluginManager.php \Drupal\service_container\Plugin\DefaultPluginManager

Defines a plugin manager used for discovering generic plugins.

Hierarchy

Expanded class hierarchy of DefaultPluginManager

2 files declare their use of DefaultPluginManager
DefaultPluginManagerTest.php in tests/src/Plugin/DefaultPluginManagerTest.php
Contains \Drupal\Tests\service_container\Plugin\DefaultPluginManagerTest
ServiceProviderPluginManager.php in src/DependencyInjection/ServiceProviderPluginManager.php
Contains \Drupal\service_container\DependencyInjection\ServiceProviderPluginManager

File

src/Plugin/DefaultPluginManager.php, line 15
Contains \Drupal\service_container\Plugin\DefaultPluginManager

Namespace

Drupal\service_container\Plugin
View source
class DefaultPluginManager extends PluginManagerBase {

  /**
   * Constructs a DefaultPluginManager object.
   *
   * @param DiscoveryInterface $discovery
   *   The discovery object used to find plugins.
   */
  public function __construct(DiscoveryInterface $discovery) {
    $this->discovery = $discovery;

    // Use a generic factory.
    $this->factory = new DefaultFactory($this->discovery);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DefaultPluginManager::__construct public function Constructs a DefaultPluginManager object. 1
PluginManagerBase::$discovery protected property The object that discovers plugins managed by this manager.
PluginManagerBase::$factory protected property The object that instantiates plugins managed by this manager.
PluginManagerBase::createInstance public function Creates a pre-configured instance of a plugin. Overrides FactoryInterface::createInstance
PluginManagerBase::getDefinition public function Gets a specific plugin definition. Overrides DiscoveryInterface::getDefinition
PluginManagerBase::getDefinitions public function Gets the definition of all plugins for this type. Overrides DiscoveryInterface::getDefinitions
PluginManagerBase::getInstance public function Gets a preconfigured instance of a plugin. Overrides MapperInterface::getInstance
PluginManagerBase::hasDefinition public function Indicates if a specific plugin definition exists. Overrides DiscoveryInterface::hasDefinition