function DataDefinition::__sleep

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/TypedData/DataDefinition.php \Drupal\Core\TypedData\DataDefinition::__sleep()
  2. 10 core/lib/Drupal/Core/TypedData/DataDefinition.php \Drupal\Core\TypedData\DataDefinition::__sleep()
  3. 11.x core/lib/Drupal/Core/TypedData/DataDefinition.php \Drupal\Core\TypedData\DataDefinition::__sleep()
2 methods override DataDefinition::__sleep()
BaseFieldDefinition::__sleep in core/lib/Drupal/Core/Field/BaseFieldDefinition.php
ComplexDataDefinitionBase::__sleep in core/lib/Drupal/Core/TypedData/ComplexDataDefinitionBase.php

File

core/lib/Drupal/Core/TypedData/DataDefinition.php, line 359

Class

DataDefinition
A typed data definition class for defining data based on defined data types.

Namespace

Drupal\Core\TypedData

Code

public function __sleep() {
    // Never serialize the typed data manager.
    $vars = get_object_vars($this);
    unset($vars['typedDataManager']);
    return array_keys($vars);
}

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