class TestTranslationManager
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php \Drupal\Tests\Core\StringTranslation\TestTranslationManager
- 10 core/modules/user/tests/src/Unit/PermissionHandlerTest.php \Drupal\Tests\user\Unit\TestTranslationManager
- 10 core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php \Drupal\Tests\Core\StringTranslation\TestTranslationManager
- 9 core/modules/user/tests/src/Unit/PermissionHandlerTest.php \Drupal\Tests\user\Unit\TestTranslationManager
- 9 core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php \Drupal\Tests\Core\StringTranslation\TestTranslationManager
- 8.9.x core/modules/user/tests/src/Unit/PermissionHandlerTest.php \Drupal\Tests\user\Unit\TestTranslationManager
- 8.9.x core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php \Drupal\Tests\Core\StringTranslation\TestTranslationManager
A chained translation implementation used for testing.
Hierarchy
- class \Drupal\Core\StringTranslation\TranslationManager implements \Drupal\Core\StringTranslation\TranslationInterface, \Drupal\Core\StringTranslation\Translator\TranslatorInterface
- class \Drupal\Tests\Core\StringTranslation\TestTranslationManager extends \Drupal\Core\StringTranslation\TranslationManager
Expanded class hierarchy of TestTranslationManager
File
-
core/
tests/ Drupal/ Tests/ Core/ StringTranslation/ TranslationManagerTest.php, line 135
Namespace
Drupal\Tests\Core\StringTranslationView source
class TestTranslationManager extends TranslationManager {
public function __construct() {
}
}
Members
| Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
|---|---|---|---|---|---|
| TestTranslationManager::__construct | public | function | Overrides TranslationManager::__construct | ||
| TranslationManager::$defaultLangcode | protected | property | The default langcode used in translations. | ||
| TranslationManager::$sortedTranslators | protected | property | An array of translators, sorted by priority. | ||
| TranslationManager::$translators | protected | property | An unsorted array of arrays of active translators. | ||
| TranslationManager::addTranslator | public | function | Appends a translation system to the translation chain. | ||
| TranslationManager::doTranslate | protected | function | Translates a string to the current language or to a given language. | ||
| TranslationManager::formatPlural | public | function | Formats a string containing a count of items. | Overrides TranslationInterface::formatPlural | |
| TranslationManager::getPluralIndex | protected | function | Returns plural form index for a specific number. | 1 | |
| TranslationManager::getStringTranslation | public | function | Retrieves English string to given language. | Overrides TranslatorInterface::getStringTranslation | |
| TranslationManager::reset | public | function | Resets translation cache. | Overrides TranslatorInterface::reset | |
| TranslationManager::selectPluralForm | public | function | Selects the plural form for a given count. | Overrides TranslationInterface::selectPluralForm | |
| TranslationManager::setDefaultLangcode | public | function | Sets the default langcode. | ||
| TranslationManager::sortTranslators | protected | function | Sorts translators according to priority. | ||
| TranslationManager::translate | public | function | Translates a string to the current language or to a given language. | Overrides TranslationInterface::translate | |
| TranslationManager::translateString | public | function | Translates a TranslatableMarkup object to a string. | Overrides TranslationInterface::translateString |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.