public function Coupon::getPromotion in Commerce Core 8.2
Gets the parent promotion.
Return value
\Drupal\commerce_promotion\Entity\PromotionInterface|null The promotion entity, or null.
Overrides CouponInterface::getPromotion
1 call to Coupon::getPromotion()
- Coupon::postSave in modules/
promotion/ src/ Entity/ Coupon.php - Acts on a saved entity before the insert or update hook is invoked.
File
- modules/
promotion/ src/ Entity/ Coupon.php, line 78
Class
- Coupon
- Defines the Coupon entity.
Namespace
Drupal\commerce_promotion\EntityCode
public function getPromotion() {
return $this
->getTranslatedReferencedEntity('promotion_id');
}