You are here

public function FeedType::__sleep in Feeds 8.3

Overrides ConfigEntityBase::__sleep

File

src/Entity/FeedType.php, line 210

Class

FeedType
Defines the Feeds feed type entity.

Namespace

Drupal\feeds\Entity

Code

public function __sleep() {
  $vars = parent::__sleep();

  // Do not serialize pluginCollection as this can contain a
  // \Drupal\Core\Entity\EntityType instance which can contain a
  // stringTranslation object that is not serializable.
  // @see https://www.drupal.org/project/drupal/issues/2893029
  $vars = array_flip($vars);
  unset($vars['pluginCollection']);
  $vars = array_flip($vars);
  return $vars;
}