function StringTranslationTrait::getStringTranslation
Gets the string translation service.
Return value
\Drupal\Core\StringTranslation\TranslationInterface The string translation service.
9 calls to StringTranslationTrait::getStringTranslation()
- 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.
- ModulesListConfirmForm::submitForm in core/
modules/ system/ src/ Form/ ModulesListConfirmForm.php - Form submission handler.
- ModulesListForm::submitForm in core/
modules/ system/ src/ Form/ ModulesListForm.php - Form submission handler.
File
-
core/
lib/ Drupal/ Core/ StringTranslation/ StringTranslationTrait.php, line 109
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.