class ServiceContainerSymfonyServiceProvider in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/src/ServiceContainer/ServiceProvider/ServiceContainerSymfonyServiceProvider.php \Drupal\service_container_symfony\ServiceContainer\ServiceProvider\ServiceContainerSymfonyServiceProvider
Provides render cache service definitions.
@codeCoverageIgnore
Hierarchy
- class \Drupal\service_container_symfony\ServiceContainer\ServiceProvider\ServiceContainerSymfonyServiceProvider implements ServiceProviderInterface
Expanded class hierarchy of ServiceContainerSymfonyServiceProvider
File
- modules/
providers/ service_container_symfony/ src/ ServiceContainer/ ServiceProvider/ ServiceContainerSymfonyServiceProvider.php, line 22 - Contains \Drupal\service_container_symfony\ServiceContainer\ServiceProvider\ServiceContainerSymfonyServiceProvider
Namespace
Drupal\service_container_symfony\ServiceContainer\ServiceProviderView source
class ServiceContainerSymfonyServiceProvider implements ServiceProviderInterface {
/**
* {@inheritdoc}
*/
public function getContainerDefinition() {
FileCacheFactory::setConfiguration(array(
'default' => array(
'class' => '\\Drupal\\Component\\FileCache\\NullFileCache',
),
));
$container_builder = new ContainerBuilder();
$yaml_loader = new YamlFileLoader($container_builder);
foreach (module_list() as $module) {
$filename = drupal_get_filename('module', $module);
$services = dirname($filename) . '/' . $module . '.services.yml';
if (file_exists($services)) {
$yaml_loader
->load($services);
}
}
// Disabled for now.
// $container_builder->compile();
$dumper = new PhpArrayDumper($container_builder);
return $dumper
->getArray();
}
/**
* {@inheritdoc}
*/
public function alterContainerDefinition(&$container_definition) {
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ServiceContainerSymfonyServiceProvider:: |
public | function |
Allows to alter the container definition. Overrides ServiceProviderInterface:: |
|
ServiceContainerSymfonyServiceProvider:: |
public | function |
Gets a service container definition. Overrides ServiceProviderInterface:: |