You are here

public function PageVariant::__sleep in Page Manager 8

Same name and namespace in other branches
  1. 8.4 src/Entity/PageVariant.php \Drupal\page_manager\Entity\PageVariant::__sleep()

Overrides ConfigEntityBase::__sleep

File

src/Entity/PageVariant.php, line 462
Contains Drupal\page_manager\Entity\PageVariant.

Class

PageVariant
Defines the page variant entity.

Namespace

Drupal\page_manager\Entity

Code

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

  // Gathered contexts objects should not be serialized.
  if (($key = array_search('contexts', $vars)) !== FALSE) {
    unset($vars[$key]);
  }
  return $vars;
}