You are here

public function TermStorage::__sleep in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/taxonomy/src/TermStorage.php \Drupal\taxonomy\TermStorage::__sleep()

Overrides DependencySerializationTrait::__sleep

File

core/modules/taxonomy/src/TermStorage.php, line 448

Class

TermStorage
Defines a Controller class for taxonomy terms.

Namespace

Drupal\taxonomy

Code

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

  // Do not serialize static cache.
  unset($vars['ancestors'], $vars['treeChildren'], $vars['treeParents'], $vars['treeTerms'], $vars['trees'], $vars['vocabularyHierarchyType']);
  return $vars;
}