I create a plugin for my header, footer actionStack. I try to find a way to check if the action layout is $this->_helper->layout->disableLayout(). This is my plugin:
class Default_Plugin_RenderPosition extends Zend_Controller_Plugin_Abstract {
public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request) {
$auth = Zend_Auth::getInstance();
$layout = Zend_Layout::getMvcInstance();
if (!$request->isXmlHttpRequest() && $auth->hasIdentity() && $layout->isEnabled()) {
$contents = array(
0 => array('controller' => 'renderposition', 'action' => 'header', 'position' => 'head'),
1 => array('controller' => 'renderposition', 'action' => 'footer', 'position' => 'foot')
);
foreach ($contents as $item) {
$action_stack = new Zend_Controller_Action_Helper_ActionStack();
$action_stack->actionToStack($item['action'],
$item['controller'],
'default',
array('position' => $item['position']));
}
}
}
}
this is my action:
public function greyboxAction(){
$this->_helper->layout->disableLayout();
}
is Zend_Auth::getInstance() the one I should call for check my action layout? Could some one help me?Thanks