Commit 556d6807 authored by alexpott's avatar alexpott

Issue #2405127 by yched: Move EntityFormDisplay::_sleep() up to EntityDisplayBase

parent 1777332e
......@@ -225,25 +225,6 @@ public function validateFormValues(FieldableEntityInterface $entity, array &$for
}
}
/**
* {@inheritdoc}
*/
public function __sleep() {
// Only store the definition, not external objects or derived data.
$keys = array_keys($this->toArray());
$keys[] = 'entityTypeId';
return $keys;
}
/**
* {@inheritdoc}
*/
public function __wakeup() {
// Run the values from self::toArray() through __construct().
$values = array_intersect_key($this->toArray(), get_object_vars($this));
$this->__construct($values, $this->entityTypeId);
}
/**
* {@inheritdoc}
*/
......
......@@ -392,4 +392,23 @@ public function onDependencyRemoval(array $dependencies) {
}
}
/**
* {@inheritdoc}
*/
public function __sleep() {
// Only store the definition, not external objects or derived data.
$keys = array_keys($this->toArray());
$keys[] = 'entityTypeId';
return $keys;
}
/**
* {@inheritdoc}
*/
public function __wakeup() {
// Run the values from self::toArray() through __construct().
$values = array_intersect_key($this->toArray(), get_object_vars($this));
$this->__construct($values, $this->entityTypeId);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment