protected function StringTranslationTrait::getStringTranslation in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php \Drupal\Core\StringTranslation\StringTranslationTrait::getStringTranslation()
Gets the string translation service.
Return value
\Drupal\Core\StringTranslation\TranslationInterface The string translation service.
12 calls to StringTranslationTrait::getStringTranslation()
- ConfigSingleImportForm::validateForm in core/
modules/ config/ src/ Form/ ConfigSingleImportForm.php - Form validation handler.
- ConfigSync::submitForm in core/
modules/ config/ src/ Form/ ConfigSync.php - Form submission handler.
- EntityType::getBundleLabel in core/
lib/ Drupal/ Core/ Entity/ EntityType.php - Gets the label for the bundle.
- EntityType::getCollectionLabel in core/
lib/ Drupal/ Core/ Entity/ EntityType.php - Gets the uppercase plural form of the name of the entity type.
- EntityType::getPluralLabel in core/
lib/ Drupal/ Core/ Entity/ EntityType.php - Gets the indefinite plural form of the name of the entity type.
File
- core/
lib/ Drupal/ Core/ StringTranslation/ StringTranslationTrait.php, line 102
Class
- StringTranslationTrait
- Wrapper methods for \Drupal\Core\StringTranslation\TranslationInterface.
Namespace
Drupal\Core\StringTranslationCode
protected function getStringTranslation() {
if (!$this->stringTranslation) {
$this->stringTranslation = \Drupal::service('string_translation');
}
return $this->stringTranslation;
}