Ejemplo n.º 1
0
 /**
  * Remove country request param from url
  *
  * @param \Magento\Backend\Block\Store\Switcher $subject
  * @param \Closure $proceed
  * @param string $route
  * @param array $params
  * @return string
  */
 public function aroundGetUrl(\Magento\Backend\Block\Store\Switcher $subject, \Closure $proceed, $route = '', $params = [])
 {
     if ($subject->getRequest()->getParam(\Magento\Paypal\Model\Config\StructurePlugin::REQUEST_PARAM_COUNTRY)) {
         $params[\Magento\Paypal\Model\Config\StructurePlugin::REQUEST_PARAM_COUNTRY] = null;
     }
     return $proceed($route, $params);
 }
Ejemplo n.º 2
0
 /**
  * Get websites
  *
  * @return \Magento\Store\Model\Website[]
  */
 public function getWebsites()
 {
     $websites = parent::getWebsites();
     foreach ($websites as $website) {
         $website->setAuthSession($this->_authSession);
     }
     return $websites;
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function getUrl($route = '', $params = array())
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getUrl');
     if (!$pluginInfo) {
         return parent::getUrl($route, $params);
     } else {
         return $this->___callPlugins('getUrl', func_get_args(), $pluginInfo);
     }
 }
Ejemplo n.º 4
0
 /**
  * Set overridden params
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setUseConfirm(false)->setSwitchUrl($this->getUrl('adminhtml/*/*', ['store' => null]));
 }
Ejemplo n.º 5
0
 /**
  * {@inheritdoc}
  */
 public function offsetGet($offset)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'offsetGet');
     if (!$pluginInfo) {
         return parent::offsetGet($offset);
     } else {
         return $this->___callPlugins('offsetGet', func_get_args(), $pluginInfo);
     }
 }
Ejemplo n.º 6
0
 /**
  * Constructor
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setId('sc_store_select');
 }
Ejemplo n.º 7
0
 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param \Magento\Store\Model\WebsiteFactory $websiteFactory
  * @param \Magento\Store\Model\GroupFactory $storeGroupFactory
  * @param \Magento\Store\Model\StoreFactory $storeFactory
  * @param \Magento\Framework\Registry $coreRegistry
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Store\Model\WebsiteFactory $websiteFactory, \Magento\Store\Model\GroupFactory $storeGroupFactory, \Magento\Store\Model\StoreFactory $storeFactory, \Magento\Framework\Registry $coreRegistry, array $data = [])
 {
     $this->_coreRegistry = $coreRegistry;
     parent::__construct($context, $websiteFactory, $storeGroupFactory, $storeFactory, $data);
 }