class TranslationWrapper
Same name and namespace in other branches
- 10 core/lib/Drupal/Core/StringTranslation/TranslationWrapper.php \Drupal\Core\StringTranslation\TranslationWrapper
- 8.9.x core/lib/Drupal/Core/StringTranslation/TranslationWrapper.php \Drupal\Core\StringTranslation\TranslationWrapper
Provides translatable string class.
Hierarchy
- class \Drupal\Component\Render\FormattableMarkup implements \Drupal\Component\Render\MarkupInterface, \Drupal\Component\Render\Countable
- class \Drupal\Core\StringTranslation\TranslatableMarkup uses \Drupal\Component\Utility\ToStringTrait extends \Drupal\Component\Render\FormattableMarkup
- class \Drupal\Core\StringTranslation\TranslationWrapper extends \Drupal\Core\StringTranslation\TranslatableMarkup
- class \Drupal\Core\StringTranslation\TranslatableMarkup uses \Drupal\Component\Utility\ToStringTrait extends \Drupal\Component\Render\FormattableMarkup
Expanded class hierarchy of TranslationWrapper
Deprecated
in drupal:8.0.0 and is removed from drupal:11.0.0. Use the \Drupal\Core\StringTranslation\TranslatableMarkup class instead.
See also
https://www.drupal.org/node/2571255
1 file declares its use of TranslationWrapper
- TranslationWrapperTest.php in core/
tests/ Drupal/ Tests/ Core/ StringTranslation/ TranslationWrapperTest.php
File
-
core/
lib/ Drupal/ Core/ StringTranslation/ TranslationWrapper.php, line 13
Namespace
Drupal\Core\StringTranslationView source
class TranslationWrapper extends TranslatableMarkup {
/**
* {@inheritdoc}
*/
public function __construct($string, array $arguments = [], array $options = [], TranslationInterface $string_translation = NULL) {
@trigger_error(__CLASS__ . ' is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. Use the \\Drupal\\Core\\StringTranslation\\TranslatableMarkup class instead. See https://www.drupal.org/node/2571255', E_USER_DEPRECATED);
parent::__construct($string, $arguments, $options, $string_translation);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.