Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AbstractScopeConfig.php
Go to the documentation of this file.
1 <?php
8 
10 
16 {
20  protected $_backendConfig;
21 
28  public function __construct(
29  \Magento\Backend\App\Action\Context $context,
30  \Magento\Config\Model\Config\Structure $configStructure,
31  ConfigSectionChecker $sectionChecker,
32  \Magento\Config\Model\Config $backendConfig
33  ) {
34  $this->_backendConfig = $backendConfig;
35  parent::__construct($context, $configStructure, $sectionChecker);
36  }
37 
44  protected function isSectionAllowed($sectionId)
45  {
46  $website = $this->getRequest()->getParam('website');
47  $store = $this->getRequest()->getParam('store');
48  if ($store) {
49  $this->_backendConfig->setStore($store);
50  } elseif ($website) {
51  $this->_backendConfig->setWebsite($website);
52  }
53  return parent::isSectionAllowed($sectionId);
54  }
55 }
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17
__construct(\Magento\Backend\App\Action\Context $context, \Magento\Config\Model\Config\Structure $configStructure, ConfigSectionChecker $sectionChecker, \Magento\Config\Model\Config $backendConfig)