You are here

public function LingotekTestServiceProvider::alter in Lingotek Translation 8

Same name and namespace in other branches
  1. 8.2 tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider::alter()
  2. 4.0.x tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider::alter()
  3. 3.0.x tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider::alter()
  4. 3.1.x tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider::alter()
  5. 3.2.x tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider::alter()
  6. 3.3.x tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider::alter()
  7. 3.4.x tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider::alter()
  8. 3.5.x tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider::alter()
  9. 3.6.x tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider::alter()
  10. 3.7.x tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider::alter()
  11. 3.8.x tests/modules/lingotek_test/src/LingotekTestServiceProvider.php \Drupal\lingotek_test\LingotekTestServiceProvider::alter()

Modifies existing service definitions.

Parameters

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

Overrides ServiceProviderBase::alter

File

tests/modules/lingotek_test/src/LingotekTestServiceProvider.php, line 20
Contains Drupal\lingotek_test\LingotekServiceProvider

Class

LingotekTestServiceProvider
Modifies the lingotek service.

Namespace

Drupal\lingotek_test

Code

public function alter(ContainerBuilder $container) {

  // Overrides lingotek class to mock communication with the server.
  $definition = $container
    ->getDefinition('lingotek');
  $definition
    ->setClass('Drupal\\lingotek_test\\LingotekFake');
}