You are here

protected function ContainerBuilder::moduleAlter in Service Container 7

Same name and namespace in other branches
  1. 7.2 src/DependencyInjection/ContainerBuilder.php \Drupal\service_container\DependencyInjection\ContainerBuilder::moduleAlter()

Provides class based version of drupal_alter() to allow testing.

This function must be mocked for unit tests.

Note: Only the container builder needs this, other classes should use the ModuleHandler within the container.

@codeCoverageIgnore

Parameters

$container_definition: The fully build container definition that can be altered by modules now.

1 call to ContainerBuilder::moduleAlter()
ContainerBuilder::getContainerDefinition in src/DependencyInjection/ContainerBuilder.php
Returns the fully build container definition.

File

src/DependencyInjection/ContainerBuilder.php, line 126
Contains \Drupal\service_container\DependencyInjection\ContainerBuilder

Class

ContainerBuilder
ContainerBuilder retrieves container definitions from service providers to build a Container.

Namespace

Drupal\service_container\DependencyInjection

Code

protected function moduleAlter(&$container_definition) {
  drupal_alter('service_container_container_build', $container_definition);
}