src/InfinityBase/Mvc/View/Http/XhrListener.php
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);
        }
    }
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);
        }
    }
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 ) ; } }
Check for XmlHttpRequest

@param EventInterface $event
Check for XmlHttpRequest