public function PromotionSubscriber::__construct in Commerce Shipping 8.2
Constructs a new PromotionSubscriber object.
Parameters
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\commerce_promotion\PromotionOfferManager $offer_manager: The offer manager.
File
- src/
EventSubscriber/ PromotionSubscriber.php, line 43
Class
- PromotionSubscriber
- Applies display-inclusive promotions to the calculated shipping rates.
Namespace
Drupal\commerce_shipping\EventSubscriberCode
public function __construct(EntityTypeManagerInterface $entity_type_manager, PromotionOfferManager $offer_manager) {
$this->promotionStorage = $entity_type_manager
->getStorage('commerce_promotion');
$this->offerManager = $offer_manager;
}