Example #1
0
 /**
  * @param PaymentHelper $paymentHelper
  * @param Escaper $escaper
  */
 public function __construct(PaymentHelper $paymentHelper, \Magento\Framework\View\Element\Context $context, \Smart2Pay\GlobalPay\Model\ConfiguredMethodsFactory $configuredMethodsFactory)
 {
     $this->_configuredMethodFactory = $configuredMethodsFactory;
     //$this->escaper = $escaper;
     $this->_request = $context->getRequest();
     $this->_assetRepo = $context->getAssetRepository();
     foreach ($this->methodCodes as $code) {
         $this->methods[$code] = $paymentHelper->getMethodInstance($code);
     }
 }
 /**
  * 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();
 }