public function ajax()
    {
        if (is_null($this->ajax)) {
            $this->ajax = (bool)(defined('DOING_AJAX') && DOING_AJAX);
            $this->ajax = (bool)($this->ajax || parent::ajax());
        }

        return $this->ajax;
    }