I'm trying to define constant in an helper of my module :
here's my Data.php :
class Data extends AbstractHelper
{
const base = "my/url";
public function getBase(){
return $this->scopeConfig->getValue(
self::base,
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
);
}
}
And my block, I create a function to get my constant :
public function getBaseAPIT(){
return $this->_helper->getBase();
}
But the result of getBaseAPIT() is null. Where am I wrong ?
PS : to do this, I've follow that https://www.maximehuran.fr/creer-un-helper-sous-magento-2/