You are here

public function TaxTypeBase::__sleep in Commerce Core 8.2

Overrides DependencySerializationTrait::__sleep

File

modules/tax/src/Plugin/Commerce/TaxType/TaxTypeBase.php, line 106

Class

TaxTypeBase
Provides the base class for tax types.

Namespace

Drupal\commerce_tax\Plugin\Commerce\TaxType

Code

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