ActionController: treat different viewRenderers
This commit is contained in:
parent
8f1ae6fc94
commit
74dfbcaa67
|
@ -353,6 +353,17 @@ abstract class ActionController extends Controller implements ControlsAndContent
|
|||
$viewRenderer = new SimpleViewRenderer();
|
||||
$viewRenderer->replaceZendViewRenderer();
|
||||
$this->view = $viewRenderer->view;
|
||||
} else {
|
||||
$viewRenderer = null;
|
||||
}
|
||||
|
||||
if ($this->getRequest()->isApiRequest()) {
|
||||
$this->_helper->layout()->disableLayout();
|
||||
if ($viewRenderer) {
|
||||
$viewRenderer->disable();
|
||||
} else {
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
}
|
||||
}
|
||||
|
||||
parent::postDispatch(); // TODO: Change the autogenerated stub
|
||||
|
|
Loading…
Reference in New Issue