function Tasks::t
Same name in other branches
- 9 core/lib/Drupal/Core/Database/Install/Tasks.php \Drupal\Core\Database\Install\Tasks::t()
- 10 core/lib/Drupal/Core/Database/Install/Tasks.php \Drupal\Core\Database\Install\Tasks::t()
Translates a string to the current language or to a given language.
Parameters
string $string: The string literal to translate.
array $args: Placeholder arguments to use inside the translated string (if any).
array $options: Options for the translation.
Return value
\Drupal\Core\StringTranslation\TranslatableMarkup An object representing the translatable markup for the given string.
Overrides StringTranslationTrait::t
See also
\Drupal\Core\StringTranslation\TranslatableMarkup::__construct()
13 calls to Tasks::t()
- Tasks::checkEngineVersion in core/
lib/ Drupal/ Core/ Database/ Install/ Tasks.php - Checks the engine version.
- Tasks::checkJsonSupport in core/
lib/ Drupal/ Core/ Database/ Install/ Tasks.php - Checks the database json support.
- Tasks::connect in core/
lib/ Drupal/ Core/ Database/ Install/ Tasks.php - Checks if we can connect to the database.
- Tasks::getFormOptions in core/
lib/ Drupal/ Core/ Database/ Install/ Tasks.php - Returns driver specific configuration options.
- Tasks::getFormOptions in core/
modules/ mysql/ src/ Driver/ Database/ mysql/ Install/ Tasks.php - Returns driver specific configuration options.
File
-
core/
lib/ Drupal/ Core/ Database/ Install/ Tasks.php, line 375
Class
- Tasks
- Database installer structure.
Namespace
Drupal\Core\Database\InstallCode
protected function t($string, array $args = [], array $options = []) {
// phpcs:ignore Drupal.Semantics.FunctionT.NotLiteralString
return new TranslatableMarkup($string, $args, $options);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.