How to access view inside plugin.
For example i have language plugin and i need to add to add javascript language array depending on language plugin output.
Thanks ;)
How to access view inside plugin.
For example i have language plugin and i need to add to add javascript language array depending on language plugin output.
Thanks ;)
Many ways, depends what you want to do.
You can grab view from viewRenderer
which you can get from HelperBroker
.
$vr = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
$view = $vr->getView();
You may also try to get it as application resource from boostrap:
$view = $this->getActionController()->getInvokeArg('view');
or
$front = $this->getFrontController();
$view = $front->getParam('boostrap')->getResource('view');
(not tested)