You are here

public function CheckoutFlowBase::__sleep in Commerce Core 8.2

Overrides DependencySerializationTrait::__sleep

1 call to CheckoutFlowBase::__sleep()
CheckoutFlowWithPanesBase::__sleep in modules/checkout/src/Plugin/Commerce/CheckoutFlow/CheckoutFlowWithPanesBase.php
1 method overrides CheckoutFlowBase::__sleep()
CheckoutFlowWithPanesBase::__sleep in modules/checkout/src/Plugin/Commerce/CheckoutFlow/CheckoutFlowWithPanesBase.php

File

modules/checkout/src/Plugin/Commerce/CheckoutFlow/CheckoutFlowBase.php, line 115

Class

CheckoutFlowBase
Provides the base checkout flow class.

Namespace

Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow

Code

public function __sleep() {
  if (!empty($this->parentEntity)) {
    $this->_parentEntityId = $this->parentEntity
      ->id();
    unset($this->parentEntity);
  }
  if (!empty($this->order)) {
    $this->_orderId = $this->order
      ->id();
    unset($this->order);
  }
  return parent::__sleep();
}