/** * 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); }
/** * Get websites * * @return \Magento\Store\Model\Website[] */ public function getWebsites() { $websites = parent::getWebsites(); foreach ($websites as $website) { $website->setAuthSession($this->_authSession); } return $websites; }
/** * {@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); } }
/** * Set overridden params * * @return void */ protected function _construct() { parent::_construct(); $this->setUseConfirm(false)->setSwitchUrl($this->getUrl('adminhtml/*/*', ['store' => null])); }
/** * {@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); } }
/** * Constructor * * @return void */ protected function _construct() { parent::_construct(); $this->setId('sc_store_select'); }
/** * @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); }