public function handleXmlHttpRequest(MvcEvent $event)
	{
		$request = $event->getRequest();
		if ($request->isXMLHttpRequest()) {
			$dispatchResult = $event->getResult();
			if ($dispatchResult instanceof ViewModel) {
				$dispatchResult->setTerminal(true);
			}
		}
	}
public function handleXmlHttpRequest(MvcEvent $event)
	{
		$request = $event->getRequest();
		if ($request->isXMLHttpRequest()) {
			$dispatchResult = $event->getResult();
			if ($dispatchResult instanceof ViewModel) {
				$dispatchResult->setTerminal(true);
			}
		}
	}
public function handleXmlHttpRequest ( MvcEvent $ event ) { $ request = $ event -> getRequest ( ) ; if ( $ request -> isXMLHttpRequest ( ) ) { $ dispatchResult = $ event -> getResult ( ) ; if ( $ dispatchResult instanceof ViewModel ) { $ dispatchResult -> setTerminal ( true ) ; } } }
If request is an XML HTTP Request disable layouts

@param MvcEvent $event
If request is an XML HTTP Request disable layouts