You are here

public function PromotionOfferInterface::apply in Commerce Core 8.2

Applies the offer to the given entity.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity.

\Drupal\commerce_promotion\Entity\PromotionInterface $promotion: THe parent promotion.

6 methods override PromotionOfferInterface::apply()
BuyXGetY::apply in modules/promotion/src/Plugin/Commerce/PromotionOffer/BuyXGetY.php
Applies the offer to the given entity.
CombinationOffer::apply in modules/promotion/src/Plugin/Commerce/PromotionOffer/CombinationOffer.php
Applies the offer to the given entity.
OrderFixedAmountOff::apply in modules/promotion/src/Plugin/Commerce/PromotionOffer/OrderFixedAmountOff.php
Applies the offer to the given entity.
OrderItemFixedAmountOff::apply in modules/promotion/src/Plugin/Commerce/PromotionOffer/OrderItemFixedAmountOff.php
Applies the offer to the given entity.
OrderItemPercentageOff::apply in modules/promotion/src/Plugin/Commerce/PromotionOffer/OrderItemPercentageOff.php
Applies the offer to the given entity.

... See full list

File

modules/promotion/src/Plugin/Commerce/PromotionOffer/PromotionOfferInterface.php, line 40

Class

PromotionOfferInterface
Defines the base interface for offers.

Namespace

Drupal\commerce_promotion\Plugin\Commerce\PromotionOffer

Code

public function apply(EntityInterface $entity, PromotionInterface $promotion);