public function PromotionInterface::hasCoupon in Commerce Core 8.2
Checks whether the promotion has a given coupon.
Parameters
\Drupal\commerce_promotion\Entity\CouponInterface $coupon: The coupon.
Return value
bool TRUE if the coupon was found, FALSE otherwise.
1 method overrides PromotionInterface::hasCoupon()
- Promotion::hasCoupon in modules/
promotion/ src/ Entity/ Promotion.php - Checks whether the promotion has a given coupon.
File
- modules/
promotion/ src/ Entity/ PromotionInterface.php, line 233
Class
- PromotionInterface
- Defines the interface for promotions.
Namespace
Drupal\commerce_promotion\EntityCode
public function hasCoupon(CouponInterface $coupon);