yii\widgets\Pjax::requiresPjax PHP Method

requiresPjax() protected method

protected requiresPjax ( ) : boolean
return boolean whether the current request requires pjax response from this widget
    protected function requiresPjax()
    {
        $headers = Yii::$app->getRequest()->getHeaders();
        return $headers->get('X-Pjax') && explode(' ', $headers->get('X-Pjax-Container'))[0] === '#' . $this->options['id'];
    }