You are here

public function FrozenintimeServiceProvider::alter in Lingotek Translation 8.2

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

Modifies existing service definitions.

Parameters

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

Overrides ServiceProviderBase::alter

File

tests/modules/frozenintime/src/FrozenintimeServiceProvider.php, line 16

Class

FrozenintimeServiceProvider
Modifies the time service.

Namespace

Drupal\frozenintime

Code

public function alter(ContainerBuilder $container) {

  // Overrides language_manager class to test domain language negotiation.
  $definition = $container
    ->getDefinition('datetime.time');
  $definition
    ->setClass('Drupal\\frozenintime\\FrozenTime');
}