public function FrozenintimeServiceProvider::alter in Lingotek Translation 3.8.x
Same name and namespace in other branches
- 8.2 tests/modules/frozenintime/src/FrozenintimeServiceProvider.php \Drupal\frozenintime\FrozenintimeServiceProvider::alter()
- 4.0.x tests/modules/frozenintime/src/FrozenintimeServiceProvider.php \Drupal\frozenintime\FrozenintimeServiceProvider::alter()
- 3.0.x tests/modules/frozenintime/src/FrozenintimeServiceProvider.php \Drupal\frozenintime\FrozenintimeServiceProvider::alter()
- 3.1.x tests/modules/frozenintime/src/FrozenintimeServiceProvider.php \Drupal\frozenintime\FrozenintimeServiceProvider::alter()
- 3.2.x tests/modules/frozenintime/src/FrozenintimeServiceProvider.php \Drupal\frozenintime\FrozenintimeServiceProvider::alter()
- 3.3.x tests/modules/frozenintime/src/FrozenintimeServiceProvider.php \Drupal\frozenintime\FrozenintimeServiceProvider::alter()
- 3.4.x tests/modules/frozenintime/src/FrozenintimeServiceProvider.php \Drupal\frozenintime\FrozenintimeServiceProvider::alter()
- 3.5.x tests/modules/frozenintime/src/FrozenintimeServiceProvider.php \Drupal\frozenintime\FrozenintimeServiceProvider::alter()
- 3.6.x tests/modules/frozenintime/src/FrozenintimeServiceProvider.php \Drupal\frozenintime\FrozenintimeServiceProvider::alter()
- 3.7.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\frozenintimeCode
public function alter(ContainerBuilder $container) {
// Overrides language_manager class to test domain language negotiation.
$definition = $container
->getDefinition('datetime.time');
$definition
->setClass('Drupal\\frozenintime\\FrozenTime');
}