Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Config.php
Go to the documentation of this file.
1 <?php
9 
18 {
23  const XML_PATH_MODULE_OUTPUT_STATUS = 'advanced/modules_disable_output/%s';
24 
29  protected $_scopeConfig;
30 
35  protected $_storeType;
36 
41  public function __construct(
42  \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
43  $scopeType
44  ) {
45  $this->_scopeConfig = $scopeConfig;
46  $this->_storeType = $scopeType;
47  }
48 
60  public function isEnabled($moduleName)
61  {
62  return $this->isSetFlag(sprintf(self::XML_PATH_MODULE_OUTPUT_STATUS, $moduleName));
63  }
64 
76  public function isSetFlag($path)
77  {
78  return $this->_scopeConfig->isSetFlag($path, $this->_storeType);
79  }
80 }
__construct(\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, $scopeType)
Definition: Config.php:41