public function check(EventInterface $event)
    {
        // Check result
        $result = $event->getResult();
        if (!$result instanceof ViewModel) {
            return;
        }

        // Check for xhr request
        $request = $event->getRequest();
        if ($request->isXmlHttpRequest()) {

            // Set terminal
            $result->setTerminal(true);
            $event->setViewModel($result);
        }
    }