public static function Drupal::translation in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal.php \Drupal::translation()
Returns the string translation service.
Return value
\Drupal\Core\StringTranslation\TranslationManager The string translation manager.
4 calls to Drupal::translation()
- DeleteActionTest::testGetDerivativeDefinitions in core/
tests/ Drupal/ KernelTests/ Core/ Action/ DeleteActionTest.php - @covers \Drupal\Core\Action\Plugin\Action\Derivative\EntityDeleteActionDeriver::getDerivativeDefinitions
- DrupalTest::testTranslation in core/
tests/ Drupal/ Tests/ Core/ DrupalTest.php - Tests the translation() method.
- PublishActionTest::testGetDerivativeDefinitions in core/
tests/ Drupal/ KernelTests/ Core/ Action/ PublishActionTest.php - @covers \Drupal\Core\Action\Plugin\Action\Derivative\EntityPublishedActionDeriver::getDerivativeDefinitions
- SaveActionTest::testGetDerivativeDefinitions in core/
tests/ Drupal/ KernelTests/ Core/ Action/ SaveActionTest.php - @covers \Drupal\Core\Action\Plugin\Action\Derivative\EntityChangedActionDeriver::getDerivativeDefinitions
File
- core/
lib/ Drupal.php, line 593
Class
- Drupal
- Static Service Container wrapper.
Code
public static function translation() {
return static::getContainer()
->get('string_translation');
}