function TranslatableStringFactory::createTranslatableMessage
Same name and namespace in other branches
- 11.x core/modules/package_manager/src/TranslatableStringFactory.php \Drupal\package_manager\TranslatableStringFactory::createTranslatableMessage()
File
-
core/
modules/ package_manager/ src/ TranslatableStringFactory.php, line 38
Class
- TranslatableStringFactory
- Creates translatable strings that can interoperate with Composer Stager.
Namespace
Drupal\package_managerCode
public function createTranslatableMessage(string $message, ?TranslationParametersInterface $parameters = NULL, ?string $domain = NULL) : TranslatableInterface {
return new TranslatableStringAdapter($message, $parameters?->getAll() ?? [], [
'context' => $domain ?? '',
], $this->translation);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.