Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FieldConfigBase.php

function FieldConfigBase::__sleep

Implements the magic __sleep() method.

Using the Serialize interface and serialize() / unserialize() methods breaks entity forms in PHP 5.4. @todo Investigate in https://www.drupal.org/node/1977206.

Overrides ConfigEntityBase::__sleep

2 calls to FieldConfigBase::__sleep()
BaseFieldOverride::__sleep in core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php
Implements the magic __sleep() method.
BaseFieldOverride::__sleep in core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php
Implements the magic __sleep() method.
1 method overrides FieldConfigBase::__sleep()
BaseFieldOverride::__sleep in core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php
Implements the magic __sleep() method.

File

core/lib/Drupal/Core/Field/FieldConfigBase.php, line 477

Class

FieldConfigBase
Base class for configurable field definitions.

Namespace

Drupal\Core\Field

Code

public function __sleep() : array {
    $properties = get_object_vars($this);
    // Only serialize necessary properties, excluding those that can be
    // recalculated.
    unset($properties['itemDefinition'], $properties['original']);
    return array_keys($properties);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal