class 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:9.0.0. Use the \Drupal\Core\StringTranslation\TranslatableMarkup class instead.
File
-
core/
lib/ Drupal/ Core/ StringTranslation/ TranslationWrapper.php, line 11
Namespace
Drupal\Core\StringTranslationView source
class TranslationWrapper extends TranslatableMarkup {
}
Members
| Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
|---|---|---|---|---|---|
| FormattableMarkup::$arguments | protected | property | The arguments to replace placeholders with. | ||
| FormattableMarkup::$string | protected | property | The string containing placeholders. | ||
| FormattableMarkup::jsonSerialize | public | function | Returns a representation of the object for use in JSON serialization. | ||
| FormattableMarkup::placeholderEscape | protected static | function | Escapes a placeholder replacement value if needed. | ||
| FormattableMarkup::placeholderFormat | protected static | function | Replaces placeholders in a string with values. | ||
| ToStringTrait::_die | protected | function | For test purposes, wrap die() in an overridable method. | ||
| ToStringTrait::__toString | public | function | Implements the magic __toString() method. | ||
| TranslatableMarkup::$options | protected | property | The translation options. | ||
| TranslatableMarkup::$stringTranslation | protected | property | The string translation service. | ||
| TranslatableMarkup::$translatedMarkup | protected | property | The translated markup without placeholder replacements. | ||
| TranslatableMarkup::count | public | function | Returns the string length. | Overrides FormattableMarkup::count | |
| TranslatableMarkup::getArguments | public | function | Gets all arguments from this translated string. | ||
| TranslatableMarkup::getOption | public | function | Gets a specific option from this translated string. | ||
| TranslatableMarkup::getOptions | public | function | Gets all options from this translated string. | ||
| TranslatableMarkup::getStringTranslation | protected | function | Gets the string translation service. | ||
| TranslatableMarkup::getUntranslatedString | public | function | Gets the untranslated string value stored in this translated string. | ||
| TranslatableMarkup::render | public | function | Renders the object as a string. | Overrides ToStringTrait::render | 1 |
| TranslatableMarkup::__construct | public | function | Constructs a new class instance. | Overrides FormattableMarkup::__construct | 1 |
| TranslatableMarkup::__sleep | public | function | Magic __sleep() method to avoid serializing the string translator. | 1 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.