You are here

public function PriceListItem::getPurchasableEntity in Commerce Pricelist 8.2

Gets the purchasable entity.

Return value

\Drupal\commerce\PurchasableEntityInterface|null The purchasable entity, or NULL.

Overrides PriceListItemInterface::getPurchasableEntity

1 call to PriceListItem::getPurchasableEntity()
PriceListItem::postSave in src/Entity/PriceListItem.php
Acts on a saved entity before the insert or update hook is invoked.

File

src/Entity/PriceListItem.php, line 117

Class

PriceListItem
Defines the price list item entity.

Namespace

Drupal\commerce_pricelist\Entity

Code

public function getPurchasableEntity() {
  return $this
    ->getTranslatedReferencedEntity('purchasable_entity');
}