예제 #1
0
파일: Save.php 프로젝트: opexsw/magento2
 /**
  * @param \Magento\Backend\App\Action\Context $context
  * @param \Magento\Config\Model\Config\Structure $configStructure
  * @param \Magento\Config\Controller\Adminhtml\System\ConfigSectionChecker $sectionChecker
  * @param \Magento\Config\Model\Config\Factory $configFactory
  * @param \Magento\Framework\Cache\FrontendInterface $cache
  * @param \Magento\Framework\Stdlib\String $string
  */
 public function __construct(\Magento\Backend\App\Action\Context $context, \Magento\Config\Model\Config\Structure $configStructure, \Magento\Config\Controller\Adminhtml\System\ConfigSectionChecker $sectionChecker, \Magento\Config\Model\Config\Factory $configFactory, \Magento\Framework\Cache\FrontendInterface $cache, \Magento\Framework\Stdlib\String $string)
 {
     parent::__construct($context, $configStructure, $sectionChecker);
     $this->_configFactory = $configFactory;
     $this->_cache = $cache;
     $this->string = $string;
 }
 /**
  * Sets scope for backend config
  *
  * @param string $sectionId
  * @return bool
  */
 protected function isSectionAllowed($sectionId)
 {
     $website = $this->getRequest()->getParam('website');
     $store = $this->getRequest()->getParam('store');
     if ($store) {
         $this->_backendConfig->setStore($store);
     } elseif ($website) {
         $this->_backendConfig->setWebsite($website);
     }
     return parent::isSectionAllowed($sectionId);
 }
 /**
  * @param \Magento\Backend\App\Action\Context $context
  * @param \Magento\Config\Model\Config\Structure $configStructure
  * @param \Magento\Config\Controller\Adminhtml\System\ConfigSectionChecker $sectionChecker
  * @param \Magento\Framework\App\Response\Http\FileFactory $fileFactory
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  */
 public function __construct(\Magento\Backend\App\Action\Context $context, \Magento\Config\Model\Config\Structure $configStructure, ConfigSectionChecker $sectionChecker, \Magento\Framework\App\Response\Http\FileFactory $fileFactory, \Magento\Store\Model\StoreManagerInterface $storeManager)
 {
     $this->_storeManager = $storeManager;
     $this->_fileFactory = $fileFactory;
     parent::__construct($context, $configStructure, $sectionChecker);
 }