In my Module, i just have a Block.
I am not using any Controller in my custom module.
In my phtml template i need to call helper class like below, We used to call in Magento1.
$params =$this->getRequest()->getParams();
$helper = Mage::helper("My Helper class"); //Here how to instantiate the helper in my phtml
$filters = $helper->getmydata();
$res = $helper->getSearchData();
How can i use helper in phtml in Magento2.
Best Answer
We can call helper class in template file like
use $_helper object to call helper method.