コード例 #1
0
ファイル: PromotionContext.php プロジェクト: loic425/Sylius
 /**
  * @param PromotionInterface $promotion
  * @param int $discount
  * @param array $configuration
  */
 private function createUnitFixedPromotion(PromotionInterface $promotion, $discount, array $configuration = [], $rule = null)
 {
     $this->persistPromotion($promotion, $this->actionFactory->createUnitFixedDiscount($discount), $configuration, $rule);
 }
コード例 #2
0
ファイル: PromotionContext.php プロジェクト: sylius/sylius
 /**
  * @param PromotionInterface $promotion
  * @param int $discount
  * @param array $configuration
  * @param PromotionRuleInterface|null $rule
  */
 private function createUnitFixedPromotion(PromotionInterface $promotion, $discount, array $configuration = [], PromotionRuleInterface $rule = null)
 {
     $channelCode = $this->sharedStorage->get('channel')->getCode();
     $this->persistPromotion($promotion, $this->actionFactory->createUnitFixedDiscount($discount, $channelCode), [$channelCode => $configuration], $rule);
 }