Loading core/modules/field/src/Entity/FieldInstanceConfig.php +6 −15 Changes for core/modules/field/src/Entity/FieldInstanceConfig.php: 6 added lines, 15 removed lines. Original line number Diff line number Diff line Loading @@ -617,7 +617,7 @@ public function targetBundle() { return $this->bundle; } /* /** * Implements the magic __sleep() method. * * Using the Serialize interface and serialize() / unserialize() methods Loading @@ -625,20 +625,11 @@ public function targetBundle() { * @todo Investigate in https://drupal.org/node/2074253. */ public function __sleep() { // Only serialize properties from self::toArray(). $properties = array_keys(array_intersect_key($this->toArray(), get_object_vars($this))); // Serialize $entityTypeId property so that toArray() works when waking up. $properties[] = 'entityTypeId'; return $properties; } /** * Implements the magic __wakeup() method. */ public function __wakeup() { // Run the values from self::toArray() through __construct(). $values = array_intersect_key($this->toArray(), get_object_vars($this)); $this->__construct($values); // Only serialize necessary properties, excluding those that can be // recalculated. $properties = get_object_vars($this); unset($properties['fieldStorage'], $properties['itemDefinition'], $properties['bundle_rename_allowed']); return array_keys($properties); } /** Loading core/modules/field/src/Entity/FieldStorageConfig.php +5 −14 Changes for core/modules/field/src/Entity/FieldStorageConfig.php: 5 added lines, 14 removed lines. Original line number Diff line number Diff line Loading @@ -642,20 +642,11 @@ public function hasData() { * @todo Investigate in https://drupal.org/node/2074253. */ public function __sleep() { // Only serialize properties from self::toArray(). $properties = array_keys(array_intersect_key($this->toArray(), get_object_vars($this))); // Serialize $entityTypeId property so that toArray() works when waking up. $properties[] = 'entityTypeId'; return $properties; } /** * Implements the magic __wakeup() method. */ public function __wakeup() { // Run the values from self::toArray() through __construct(). $values = array_intersect_key($this->toArray(), get_object_vars($this)); $this->__construct($values); // Only serialize necessary properties, excluding those that can be // recalculated. $properties = get_object_vars($this); unset($properties['schema'], $properties['propertyDefinitions']); return array_keys($properties); } /** Loading Loading
core/modules/field/src/Entity/FieldInstanceConfig.php +6 −15 Changes for core/modules/field/src/Entity/FieldInstanceConfig.php: 6 added lines, 15 removed lines. Original line number Diff line number Diff line Loading @@ -617,7 +617,7 @@ public function targetBundle() { return $this->bundle; } /* /** * Implements the magic __sleep() method. * * Using the Serialize interface and serialize() / unserialize() methods Loading @@ -625,20 +625,11 @@ public function targetBundle() { * @todo Investigate in https://drupal.org/node/2074253. */ public function __sleep() { // Only serialize properties from self::toArray(). $properties = array_keys(array_intersect_key($this->toArray(), get_object_vars($this))); // Serialize $entityTypeId property so that toArray() works when waking up. $properties[] = 'entityTypeId'; return $properties; } /** * Implements the magic __wakeup() method. */ public function __wakeup() { // Run the values from self::toArray() through __construct(). $values = array_intersect_key($this->toArray(), get_object_vars($this)); $this->__construct($values); // Only serialize necessary properties, excluding those that can be // recalculated. $properties = get_object_vars($this); unset($properties['fieldStorage'], $properties['itemDefinition'], $properties['bundle_rename_allowed']); return array_keys($properties); } /** Loading
core/modules/field/src/Entity/FieldStorageConfig.php +5 −14 Changes for core/modules/field/src/Entity/FieldStorageConfig.php: 5 added lines, 14 removed lines. Original line number Diff line number Diff line Loading @@ -642,20 +642,11 @@ public function hasData() { * @todo Investigate in https://drupal.org/node/2074253. */ public function __sleep() { // Only serialize properties from self::toArray(). $properties = array_keys(array_intersect_key($this->toArray(), get_object_vars($this))); // Serialize $entityTypeId property so that toArray() works when waking up. $properties[] = 'entityTypeId'; return $properties; } /** * Implements the magic __wakeup() method. */ public function __wakeup() { // Run the values from self::toArray() through __construct(). $values = array_intersect_key($this->toArray(), get_object_vars($this)); $this->__construct($values); // Only serialize necessary properties, excluding those that can be // recalculated. $properties = get_object_vars($this); unset($properties['schema'], $properties['propertyDefinitions']); return array_keys($properties); } /** Loading