You are here

public function Promotion::getCoupons in Commerce Core 8.2

Gets the coupons.

Return value

\Drupal\commerce_promotion\Entity\CouponInterface[] The coupons.

Overrides PromotionInterface::getCoupons

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

File

modules/promotion/src/Entity/Promotion.php, line 329

Class

Promotion
Defines the promotion entity class.

Namespace

Drupal\commerce_promotion\Entity

Code

public function getCoupons() {
  $coupons = $this
    ->get('coupons')
    ->referencedEntities();
  return $coupons;
}