Example #1
0
 /**
  * @param Context $context
  */
 public function __construct(Context $context)
 {
     $this->translateInline = $context->getTranslateInline();
     $this->_moduleManager = $context->getModuleManager();
     $this->_logger = $context->getLogger();
     $this->_request = $context->getRequest();
     $this->_urlBuilder = $context->getUrlBuilder();
     $this->_httpHeader = $context->getHttpHeader();
     $this->_eventManager = $context->getEventManager();
     $this->_remoteAddress = $context->getRemoteAddress();
     $this->_cacheConfig = $context->getCacheConfig();
 }
 /**
  * @param Context $context
  */
 public function __construct(Context $context)
 {
     $this->_moduleManager = $context->getModuleManager();
     $this->_logger = $context->getLogger();
     $this->_request = $context->getRequest();
     $this->_urlBuilder = $context->getUrlBuilder();
     $this->_httpHeader = $context->getHttpHeader();
     $this->_eventManager = $context->getEventManager();
     $this->_remoteAddress = $context->getRemoteAddress();
     $this->_cacheConfig = $context->getCacheConfig();
     $this->urlEncoder = $context->getUrlEncoder();
     $this->urlDecoder = $context->getUrlDecoder();
     $this->scopeConfig = $context->getScopeConfig();
 }
Example #3
0
 /**
  * @param Context $context
  * @param array $data
  */
 public function __construct(Context $context, array $data = [])
 {
     $this->_conditionFactory = $context->getConditionFactory();
     $this->_logger = $context->getLogger();
     parent::__construct($context, $data);
     $this->setType('Magento\\Rule\\Model\\Condition\\Combine')->setAggregator('all')->setValue(true)->setConditions([])->setActions([]);
     $this->loadAggregatorOptions();
     $options = $this->getAggregatorOptions();
     if ($options) {
         foreach (array_keys($options) as $aggregator) {
             $this->setAggregator($aggregator);
             break;
         }
     }
 }
Example #4
0
 public function testGetLogger()
 {
     $this->assertInstanceOf('\\Psr\\Log\\LoggerInterface', $this->context->getLogger());
 }
Example #5
0
 public function testGetLogger()
 {
     $this->assertInstanceOf('\\Magento\\Framework\\Logger', $this->context->getLogger());
 }