I have defined a constant in a custom helper in module A. I want to call it an admin method from a custom controller from a custom module B.
This is my custom helper class from module A:
Mymodule_Mynamespace_Helper_MyClass
Getting my constant value from this class in another module (B) , in a block or model, like Mymodule_Mynamespace_Helper_MyClass::TEST_CONSTANT
, it works .
Doing the same thing in a controller method:
public function myMethodAction(){
echo Mymodule_Mynamespace_Helper_MyClass::TEST_CONSTANT
}
I am getting this error message: Error: Undefined class constant
Any clue why ? Thank you in advance