protected function ServiceContainerServiceProvider::getPluginManagerDefinition in Service Container 7
Same name and namespace in other branches
- 7.2 src/ServiceContainer/ServiceProvider/ServiceContainerServiceProvider.php \Drupal\service_container\ServiceContainer\ServiceProvider\ServiceContainerServiceProvider::getPluginManagerDefinition()
Gets plugin manager definition to make it simpler to register plugins.
Parameters
string $name: The owning module of the plugin.
string $discovery_class: The discovery class in use to discover plugins.
array $plugin_manager: The plugin manager definition
Return value
array
1 call to ServiceContainerServiceProvider::getPluginManagerDefinition()
- ServiceContainerServiceProvider::processPluginManagers in src/
ServiceContainer/ ServiceProvider/ ServiceContainerServiceProvider.php - Processes plugin managers of varying types and registers them in the container based on the given discovery class.
File
- src/
ServiceContainer/ ServiceProvider/ ServiceContainerServiceProvider.php, line 350 - Contains \Drupal\service_container\ServiceContainer\ServiceProvider\ServiceContainerServiceProvider
Class
- ServiceContainerServiceProvider
- Provides render cache service definitions.
Namespace
Drupal\service_container\ServiceContainer\ServiceProviderCode
protected function getPluginManagerDefinition($name, $discovery_class, $plugin_manager) {
$prefix = "{$name}.internal.";
return array(
'class' => '\\Drupal\\service_container\\Plugin\\ContainerAwarePluginManager',
'arguments' => array(
$prefix,
),
'calls' => array(
array(
'setContainer',
array(
'@service_container',
),
),
),
'tags' => array(
array(
'name' => 'plugin_manager',
'discovery_class' => $discovery_class,
'prefix' => $prefix,
'plugin_manager_definition' => $plugin_manager,
),
),
);
}