Just need to set up navigation per admin module, I know it is strange and not really good practice may be but I need to set it for admin part. thanks
+2
A:
Try this:
$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
if (null === $viewRenderer->view) {
$viewRenderer->initView();
}
$view = $viewRenderer->view;
This excerpt is taken from Zend_Layout::getView()
;
If you are going to need the layout anyway too, you could extend Zend_Layout_Controller_Plugin_Layout
in stead of Zend_Controller_Plugin_Abstract
.
Then, to access the layout do:
$this->getLayout();
And to access the view, do:
$this->getLayout()->getView();
fireeyedboy
2010-02-25 16:43:00
thanks, btw does the Zend_Controller_Action_HelperBroker implement some well known design patters, just the word broker sound very like a pattern ?
simple
2010-02-25 16:45:21
I guess it implements the Broker Pattern. ;-) Not farmiliar with it to be honoust. So I couldn't tell you much more about it.
fireeyedboy
2010-02-25 16:49:19
Ok thanks, then will stumble the Broker pattern myself.
simple
2010-02-25 17:07:53
A:
Ok, I retrieved like
$layout = Zend_Layout::getMvcInstance();
$navigation = $layout->getView()->navigation();
inside the plugin that extends Zend_Controller_Plugin_Abstract thanks thoug, still better methods are welcome
simple
2010-02-25 16:43:06