Core/Http/Request.php
public function isAjax()
    {
        if ($this->headers->get('HTTP_X_REQUESTED_WITH') !== null
            && strtolower($this->headers->get('HTTP_X_REQUESTED_WITH')) === 'xmlhttprequest'
        ) {
            return true;
        }
        return false;
    }
public function isAjax()
    {
        if ($this->headers->get('HTTP_X_REQUESTED_WITH') !== null
            && strtolower($this->headers->get('HTTP_X_REQUESTED_WITH')) === 'xmlhttprequest'
        ) {
            return true;
        }
        return false;
    }
public function isAjax ( ) { if ( $ this -> headers -> get ( 'HTTP_X_REQUESTED_WITH' ) !== null && strtolower ( $ this -> headers -> get ( 'HTTP_X_REQUESTED_WITH' ) ) === 'xmlhttprequest' ) { return true ; } return false ; }
Check if it is AJAX request.

@return bool
Check if it is AJAX request .