You are here

public function PaymentGatewayBase::__sleep in Commerce Core 8.2

Overrides DependencySerializationTrait::__sleep

File

modules/payment/src/Plugin/Commerce/PaymentGateway/PaymentGatewayBase.php, line 149

Class

PaymentGatewayBase
Provides the base class for payment gateways.

Namespace

Drupal\commerce_payment\Plugin\Commerce\PaymentGateway

Code

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