function StringTranslationTrait::setStringTranslation
Sets the string translation service to use.
Parameters
\Drupal\Core\StringTranslation\TranslationInterface $translation: The string translation service.
Return value
$this
4 calls to StringTranslationTrait::setStringTranslation()
- BreakpointManager::__construct in core/
modules/ breakpoint/ src/ BreakpointManager.php - Constructs a new BreakpointManager instance.
- EntityRevisionViewController::__construct in core/
lib/ Drupal/ Core/ Entity/ Controller/ EntityRevisionViewController.php - Creates a new EntityRevisionViewController.
- EntityViewsData::__construct in core/
modules/ views/ src/ EntityViewsData.php - Constructs an EntityViewsData object.
- InstallProfileUninstallValidator::__construct in core/
lib/ Drupal/ Core/ Extension/ InstallProfileUninstallValidator.php
File
-
core/
lib/ Drupal/ Core/ StringTranslation/ StringTranslationTrait.php, line 124
Class
- StringTranslationTrait
- Wrapper methods for \Drupal\Core\StringTranslation\TranslationInterface.
Namespace
Drupal\Core\StringTranslationCode
public function setStringTranslation(TranslationInterface $translation) {
$this->stringTranslation = $translation;
return $this;
}