<?php namespace YourNamespace\Module\Helper; class Data extends \Magento\Framework\App\Helper\AbstractHelper { /** * @var \Magento\Framework\App\Config\ScopeConfigInterface */ protected $scopeConfig; /** * Recipient Top Static Block config path */ const XML_PATH_CMS_BLOCK_TOP = 'section_id/groupid/field_id'; public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig ) { $this->scopeConfig = $scopeConfig; } /** * function returning config value */ public function getConfigData() { $storeScope = \Magento\Store\Model\ScopeInterface::SCOPE_STORE; return $this->scopeConfig->getValue(self::XML_PATH_EMAIL_RECIPIENT, $storeScope); } }
Categories: Magento2
0 Comments