You are here

public function BaseFieldOverride::__sleep in Drupal 8

Same name and namespace in other branches
  1. 9 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();
}