Commit 8c1d39b3 by tof06

Add getIsPjax method to Request

parent 72db286f
......@@ -292,6 +292,15 @@ class Request extends \yii\base\Request
}
/**
* Returns wheter this is a PJAX request
* @return boolean wether this is a PJAX request
*/
public function getIsPjax ()
{
return $this->getIsAjax() && isset($_SERVER['HTTP_X_PJAX']) && $_SERVER['HTTP_X_PJAX']==true;
}
/**
* Returns whether this is an Adobe Flash or Flex request.
* @return boolean whether this is an Adobe Flash or Adobe Flex request.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment