function BaseFieldOverride::__sleep

Same name in other branches
  1. 9 core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php \Drupal\Core\Field\Entity\BaseFieldOverride::__sleep()
  2. 8.9.x core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php \Drupal\Core\Field\Entity\BaseFieldOverride::__sleep()
  3. 10 core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php \Drupal\Core\Field\Entity\BaseFieldOverride::__sleep()

Implements the magic __sleep() method.

Overrides FieldConfigBase::__sleep

File

core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php, line 262

Class

BaseFieldOverride
Defines the base field override entity.

Namespace

Drupal\Core\Field\Entity

Code

public function __sleep() : array {
    // Only serialize necessary properties, excluding those that can be
    // recalculated.
    unset($this->baseFieldDefinition);
    return parent::__sleep();
}

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