/**
  * Constructor
  *
  * @param \Magento\Framework\View\Element\Context $context
  * @param array $data
  */
 public function __construct(\Magento\Framework\View\Element\Context $context, array $data = [])
 {
     $this->_request = $context->getRequest();
     $this->_layout = $context->getLayout();
     $this->_eventManager = $context->getEventManager();
     $this->_urlBuilder = $context->getUrlBuilder();
     $this->_cache = $context->getCache();
     $this->_design = $context->getDesignPackage();
     $this->_session = $context->getSession();
     $this->_sidResolver = $context->getSidResolver();
     $this->_scopeConfig = $context->getScopeConfig();
     $this->_assetRepo = $context->getAssetRepository();
     $this->_viewConfig = $context->getViewConfig();
     $this->_cacheState = $context->getCacheState();
     $this->_logger = $context->getLogger();
     $this->_escaper = $context->getEscaper();
     $this->filterManager = $context->getFilterManager();
     $this->_localeDate = $context->getLocaleDate();
     $this->inlineTranslation = $context->getInlineTranslation();
     if (isset($data['jsLayout'])) {
         $this->jsLayout = $data['jsLayout'];
         unset($data['jsLayout']);
     }
     parent::__construct($data);
     $this->_construct();
 }
Example #2
0
 /**
  * ModifyPrice constructor.
  *
  * @param Context $context Context
  */
 public function __construct(Context $context)
 {
     $this->scopeConfig = $context->getScopeConfig();
 }
 /**
  * ModifyPrice constructor.
  *
  * @param Data                                    $helper  Helper
  * @param \Magento\Framework\View\Element\Context $context Context
  */
 public function __construct(Data $helper, \Magento\Framework\View\Element\Context $context)
 {
     $this->scopeConfig = $context->getScopeConfig();
     $this->helper = $helper;
 }
 /**
  * ModifyPrice constructor.
  * @param \Magento\Framework\View\Element\Context $context
  * @param Session $customerSession
  * @param CustomerRepository $customerRepository
  */
 public function __construct(\Magento\Framework\View\Element\Context $context, Session $customerSession, CustomerRepository $customerRepository)
 {
     $this->scopeConfig = $context->getScopeConfig();
     $this->customerSession = $customerSession;
     $this->customerRepository = $customerRepository;
 }