Recommended way
<?php
namespace QaisarSatti\HelloWorld\Helper;
class Data extends \Magento\Framework\App\Helper\AbstractHelper
{
public function getConfig($config_path)
{
return $this->scopeConfig->getValue(
$config_path,
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
);
}
}
get values in phtml
$helper = $this->helper('QaisarSatti\HelloWorld\Helper\Data');
$helper->getConfig('bannertab/settings/banner_content_type');
$helper->getConfig('bannertab/settings/enable');
Not Recommended way
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$conf = $objectManager->get('Magento\Framework\App\Config\ScopeConfigInterface')->getValue('bannertab/settings/banner_content_type');