function TranslatableMarkup::__sleep

Same name in other branches
  1. 9 core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php \Drupal\Core\StringTranslation\TranslatableMarkup::__sleep()
  2. 8.9.x core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php \Drupal\Core\StringTranslation\TranslatableMarkup::__sleep()
  3. 11.x core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php \Drupal\Core\StringTranslation\TranslatableMarkup::__sleep()

Magic __sleep() method to avoid serializing the string translator.

1 call to TranslatableMarkup::__sleep()
PluralTranslatableMarkup::__sleep in core/lib/Drupal/Core/StringTranslation/PluralTranslatableMarkup.php
Magic __sleep() method to avoid serializing the string translator.
1 method overrides TranslatableMarkup::__sleep()
PluralTranslatableMarkup::__sleep in core/lib/Drupal/Core/StringTranslation/PluralTranslatableMarkup.php
Magic __sleep() method to avoid serializing the string translator.

File

core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php, line 203

Class

TranslatableMarkup
Provides translatable markup class.

Namespace

Drupal\Core\StringTranslation

Code

public function __sleep() {
    return [
        'string',
        'arguments',
        'options',
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.