public function ServiceContainerServiceProvider::registerCToolsPluginTypes in Service Container 7.2
Same name and namespace in other branches
- 7 src/ServiceContainer/ServiceProvider/ServiceContainerServiceProvider.php \Drupal\service_container\ServiceContainer\ServiceProvider\ServiceContainerServiceProvider::registerCToolsPluginTypes()
Automatically register all ctools plugins of the given types.
Parameters
array $container_definition: The container definition to process.
array $ctools_types: Array of plugin types, indexed by module name.
1 call to ServiceContainerServiceProvider::registerCToolsPluginTypes()
- ServiceContainerServiceProvider::alterContainerDefinition in src/
ServiceContainer/ ServiceProvider/ ServiceContainerServiceProvider.php - Allows to alter the container definition.
File
- src/
ServiceContainer/ ServiceProvider/ ServiceContainerServiceProvider.php, line 267 - Contains \Drupal\service_container\ServiceContainer\ServiceProvider\ServiceContainerServiceProvider
Class
- ServiceContainerServiceProvider
- Provides render cache service definitions.
Namespace
Drupal\service_container\ServiceContainer\ServiceProviderCode
public function registerCToolsPluginTypes(&$container_definition, $ctools_types) {
foreach ($ctools_types as $owner => $plugins) {
foreach ($plugins as $plugin_type => $plugin_data) {
if (isset($container_definition['parameters']['service_container.plugin_managers']['ctools'][$owner . '.' . $plugin_type])) {
continue;
}
$this
->registerAliasServices($container_definition, $owner, $plugin_type);
$container_definition['parameters']['service_container.plugin_managers']['ctools'][$owner . '.' . $plugin_type] = array(
'owner' => $owner,
'type' => $plugin_type,
);
}
}
}