I want to use some ajax, but I don\'t know how to use function as the same as setNoRender() in zend framework 2 to disable for render view.
How to disable rendering v
To disable your view :
public function myactionAction()
{
// your code here ...
return false;
}
"return false" disables the view and not the layout! why? because the accepted types are:
so "false" disable the view.
To disable layout and view, return a response object:
public function myactionAction()
{
// your code here ...
return $this->response;
}
To disable layout:
public function myactionAction()
{
// your code here ...
$view = new ViewModel();
$view->setTerminal(true);
return $view;
}