Skip to content

Commit

Permalink
Update Data.php
Browse files Browse the repository at this point in the history
  • Loading branch information
alothemes committed Dec 25, 2020
1 parent e02d579 commit b4cfcea
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @Author: nguyen
* @Date: 2020-02-12 14:01:01
* @Last Modified by: Alex Dong
* @Last Modified time: 2020-08-25 14:26:07
* @Last Modified time: 2020-12-25 10:54:35
*/

namespace Magepow\Core\Helper;
Expand All @@ -15,11 +15,18 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
*/
protected $configModule;

/**
* @var \Magento\Framework\Module\Manager
*/
protected $moduleManager;

public function __construct(
\Magento\Framework\App\Helper\Context $context
\Magento\Framework\App\Helper\Context $context,
\Magento\Framework\Module\Manager $moduleManager
)
{
parent::__construct($context);
$this->moduleManager = $moduleManager;
$this->configModule = $this->getConfig(strtolower($this->_getModuleName()));
}

Expand Down Expand Up @@ -48,4 +55,9 @@ public function getConfigModule($cfg='', $value=null)
return $value;
}

public function isEnabledModule($moduleName)
{
return $this->moduleManager->isEnabled($moduleName);
}

}

0 comments on commit b4cfcea

Please sign in to comment.