class TranslationWrapper in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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.x, will be removed before Drupal 9.0. Use the \Drupal\Core\StringTranslation\TranslatableMarkup class instead.
File
- core/
lib/ Drupal/ Core/ StringTranslation/ TranslationWrapper.php, line 16 - Contains \Drupal\Core\StringTranslation\TranslationWrapper.
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:: |
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 to be translated. | |
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 argments 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. |