I want to modify a view from Action Helper in Zend Framework in preDispatch() method. So I do something like:
class MyHelper extends Zend_Controller_Action_Helper_Abstract {
public function preDispatch() {
$view = $this->getActionController()->view;
$view->doSomething();
}
}
Is it OK to do so? What I want to do is - MyHelper needs to adjust some paths to templates (in this case view is a SmartyView) according to users locale, so I would like to read out users locale in my action helper and then adjust view accordingly.
I am doing right here or should I go some different way?
Thanks!