class TranslationWrapper in Drupal 8
Same name and namespace in other branches
- 9 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\Countable, MarkupInterface
- class \Drupal\Core\StringTranslation\TranslatableMarkup uses ToStringTrait
- class \Drupal\Core\StringTranslation\TranslationWrapper
- class \Drupal\Core\StringTranslation\TranslatableMarkup uses ToStringTrait
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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FormattableMarkup:: |
protected | property | The arguments to replace placeholders with. | |
FormattableMarkup:: |
protected | property | The string containing placeholders. | |
FormattableMarkup:: |
public | function | Returns a representation of the object for use in JSON serialization. | |
FormattableMarkup:: |
protected static | function | Escapes a placeholder replacement value if needed. | |
FormattableMarkup:: |
protected static | function | Replaces placeholders in a string with values. | |
ToStringTrait:: |
protected | function | For test purposes, wrap die() in an overridable method. | |
ToStringTrait:: |
public | function | Implements the magic __toString() method. | |
TranslatableMarkup:: |
protected | property | The translation options. | |
TranslatableMarkup:: |
protected | property | The string translation service. | |
TranslatableMarkup:: |
protected | property | The translated markup without placeholder replacements. | |
TranslatableMarkup:: |
public | function |
Returns the string length. Overrides FormattableMarkup:: |
|
TranslatableMarkup:: |
public | function | Gets all arguments from this translated string. | |
TranslatableMarkup:: |
public | function | Gets a specific option from this translated string. | |
TranslatableMarkup:: |
public | function | Gets all options from this translated string. | |
TranslatableMarkup:: |
protected | function | Gets the string translation service. | |
TranslatableMarkup:: |
public | function | Gets the untranslated string value stored in this translated string. | |
TranslatableMarkup:: |
public | function |
Renders the object as a string. Overrides ToStringTrait:: |
1 |
TranslatableMarkup:: |
public | function |
Constructs a new class instance. Overrides FormattableMarkup:: |
1 |
TranslatableMarkup:: |
public | function | Magic __sleep() method to avoid serializing the string translator. | 1 |