ContainerRebuildTestServiceProvider.php in Drupal 10
Same filename and directory in other branches
Namespace
Drupal\container_rebuild_testFile
core/modules/system/tests/modules/container_rebuild_test/src/ContainerRebuildTestServiceProvider.phpView source
<?php
namespace Drupal\container_rebuild_test;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\ServiceModifierInterface;
class ContainerRebuildTestServiceProvider implements ServiceModifierInterface {
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
$count = $container
->get('state')
->get('container_rebuild_test.count', 0);
$container
->get('state')
->set('container_rebuild_test.count', ++$count);
}
}
Classes
Name | Description |
---|---|
ContainerRebuildTestServiceProvider |