Exemple #1
0
 /**
  * @param \Magento\Framework\Model\ResourceModel\Db\Context $context
  * @param \Magento\Framework\Stdlib\StringUtils $string
  * @param \Magento\SalesRule\Model\ResourceModel\Coupon $resourceCoupon
  * @param string $connectionName
  */
 public function __construct(\Magento\Framework\Model\ResourceModel\Db\Context $context, \Magento\Framework\Stdlib\StringUtils $string, \Magento\SalesRule\Model\ResourceModel\Coupon $resourceCoupon, $connectionName = null)
 {
     $this->string = $string;
     $this->_resourceCoupon = $resourceCoupon;
     $this->_associatedEntitiesMap = $this->getAssociatedEntitiesMap();
     parent::__construct($context, $connectionName);
 }
Exemple #2
0
 /**
  * Rule constructor.
  * @param \Magento\Framework\Model\ResourceModel\Db\Context $context
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param Product\ConditionFactory $conditionFactory
  * @param \Magento\Framework\Stdlib\DateTime\DateTime $coreDate
  * @param \Magento\Eav\Model\Config $eavConfig
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param \Magento\CatalogRule\Helper\Data $catalogRuleData
  * @param \Psr\Log\LoggerInterface $logger
  * @param \Magento\Framework\Stdlib\DateTime $dateTime
  * @param PriceCurrencyInterface $priceCurrency
  * @param \Magento\Framework\EntityManager\EntityManager $entityManager
  * @param array $associatedEntitiesMap
  * @param null $connectionName
  * @SuppressWarnings(PHPMD.ExcessiveParameterList)
  */
 public function __construct(\Magento\Framework\Model\ResourceModel\Db\Context $context, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Model\Product\ConditionFactory $conditionFactory, \Magento\Framework\Stdlib\DateTime\DateTime $coreDate, \Magento\Eav\Model\Config $eavConfig, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\CatalogRule\Helper\Data $catalogRuleData, \Psr\Log\LoggerInterface $logger, \Magento\Framework\Stdlib\DateTime $dateTime, PriceCurrencyInterface $priceCurrency, \Magento\Framework\EntityManager\EntityManager $entityManager, array $associatedEntitiesMap = [], $connectionName = null)
 {
     $this->_storeManager = $storeManager;
     $this->_conditionFactory = $conditionFactory;
     $this->_coreDate = $coreDate;
     $this->_eavConfig = $eavConfig;
     $this->_eventManager = $eventManager;
     $this->_catalogRuleData = $catalogRuleData;
     $this->_logger = $logger;
     $this->dateTime = $dateTime;
     $this->priceCurrency = $priceCurrency;
     $this->entityManager = $entityManager;
     $this->_associatedEntitiesMap = $associatedEntitiesMap;
     parent::__construct($context, $connectionName);
 }