I have Action Helper that is database abstraction layer.
I would like to access it in View Helper to read and present some data from the model.
In Controller I call Action Helper as broker method, but how to achieve the same in View Helper?
Somewhere in controller:
$this->_helper->Service("Custom\\PageService");
Service.php:
...
public function direct($serviceClass)
{
return new $serviceClass($this->em);
}
Nicer way will be to create a view helper inside it do
another way would be inside controller init method do
so in view (phtml) you can do