File tree Expand file tree Collapse file tree 1 file changed +7
-13
lines changed
app/code/Magento/Newsletter/Model Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change 77
88namespace Magento \Newsletter \Model ;
99
10+ use Magento \Framework \App \Config \ScopeConfigInterface ;
11+
1012/**
1113 * Newsletter configuration model
1214 */
@@ -18,36 +20,28 @@ class Config
1820 const XML_PATH_NEWSLETTER_ACTIVE = 'newsletter/general/active ' ;
1921
2022 /**
21- * @var \Magento\Framework\App\Config\ ScopeConfigInterface
23+ * @var ScopeConfigInterface
2224 */
2325 protected $ scopeConfig ;
2426
25- /**
26- * @var \Magento\Config\Model\ResourceModel\Config
27- */
28- protected $ resourceConfig ;
29-
3027 /**
3128 * Config constructor.
3229 *
33- * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
34- * @param \Magento\Config\Model\ResourceModel\Config $resourceConfig
30+ * @param ScopeConfigInterface $scopeConfig
3531 */
3632 public function __construct (
37- \Magento \Framework \App \Config \ScopeConfigInterface $ scopeConfig ,
38- \Magento \Config \Model \ResourceModel \Config $ resourceConfig
33+ ScopeConfigInterface $ scopeConfig
3934 ) {
4035 $ this ->scopeConfig = $ scopeConfig ;
41- $ this ->resourceConfig = $ resourceConfig ;
4236 }
4337
4438 /**
4539 * Returns newsletter's enabled status
4640 *
4741 * @return bool
4842 */
49- public function isActive ()
43+ public function isActive ($ scopeType = ScopeConfigInterface:: SCOPE_TYPE_DEFAULT )
5044 {
51- return $ this ->scopeConfig ->isSetFlag (self ::XML_PATH_NEWSLETTER_ACTIVE );
45+ return $ this ->scopeConfig ->isSetFlag (self ::XML_PATH_NEWSLETTER_ACTIVE , $ scopeType );
5246 }
5347}
You can’t perform that action at this time.
0 commit comments