function BaseFieldOverride::__sleep

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php \Drupal\Core\Field\Entity\BaseFieldOverride::__sleep()
  2. 10 core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php \Drupal\Core\Field\Entity\BaseFieldOverride::__sleep()
  3. 11.x 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 247

Class

BaseFieldOverride
Defines the base field override entity.

Namespace

Drupal\Core\Field\Entity

Code

public function __sleep() {
    // 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.