class DefaultPluginManager in Service Container 7
Same name in this branch
- 7 src/Plugin/DefaultPluginManager.php \Drupal\service_container\Plugin\DefaultPluginManager
- 7 lib/Drupal/Component/Plugin/DefaultPluginManager.php \Drupal\Core\Plugin\DefaultPluginManager
Same name and namespace in other branches
- 7.2 src/Plugin/DefaultPluginManager.php \Drupal\service_container\Plugin\DefaultPluginManager
Defines a plugin manager used for discovering generic plugins.
Hierarchy
- class \Drupal\service_container\Plugin\PluginManagerBase implements PluginManagerInterface
- class \Drupal\service_container\Plugin\DefaultPluginManager
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\PluginView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DefaultPluginManager:: |
public | function | Constructs a DefaultPluginManager object. | 1 |
PluginManagerBase:: |
protected | property | The object that discovers plugins managed by this manager. | |
PluginManagerBase:: |
protected | property | The object that instantiates plugins managed by this manager. | |
PluginManagerBase:: |
public | function |
Creates a pre-configured instance of a plugin. Overrides FactoryInterface:: |
|
PluginManagerBase:: |
public | function |
Gets a specific plugin definition. Overrides DiscoveryInterface:: |
|
PluginManagerBase:: |
public | function |
Gets the definition of all plugins for this type. Overrides DiscoveryInterface:: |
|
PluginManagerBase:: |
public | function |
Gets a preconfigured instance of a plugin. Overrides MapperInterface:: |
|
PluginManagerBase:: |
public | function |
Indicates if a specific plugin definition exists. Overrides DiscoveryInterface:: |