function ServiceModifierInterface::alter

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/DependencyInjection/ServiceModifierInterface.php \Drupal\Core\DependencyInjection\ServiceModifierInterface::alter()
  2. 10 core/lib/Drupal/Core/DependencyInjection/ServiceModifierInterface.php \Drupal\Core\DependencyInjection\ServiceModifierInterface::alter()
  3. 11.x core/lib/Drupal/Core/DependencyInjection/ServiceModifierInterface.php \Drupal\Core\DependencyInjection\ServiceModifierInterface::alter()

Modifies existing service definitions.

Parameters

ContainerBuilder $container: The ContainerBuilder whose service definitions can be altered.

11 methods override ServiceModifierInterface::alter()
AcceptHeaderRoutingTestServiceProvider::alter in core/modules/system/tests/modules/accept_header_routing_test/src/AcceptHeaderRoutingTestServiceProvider.php
Modifies existing service definitions.
ContainerRebuildTestServiceProvider::alter in core/modules/system/tests/modules/container_rebuild_test/src/ContainerRebuildTestServiceProvider.php
Modifies existing service definitions.
CoreServiceProvider::alter in core/lib/Drupal/Core/CoreServiceProvider.php
Alters the UUID service to use the most efficient method available.
ErrorServiceTestServiceProvider::alter in core/modules/system/tests/modules/error_service_test/src/ErrorServiceTestServiceProvider.php
Modifies existing service definitions.
FileServiceProvider::alter in core/modules/file/src/FileServiceProvider.php
Modifies existing service definitions.

... See full list

File

core/lib/Drupal/Core/DependencyInjection/ServiceModifierInterface.php, line 18

Class

ServiceModifierInterface
Interface that service providers can implement to modify services.

Namespace

Drupal\Core\DependencyInjection

Code

public function alter(ContainerBuilder $container);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.