* add function for check ajax request.
This commit is contained in:
@@ -441,6 +441,18 @@ class helper
|
||||
return $string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check is ajax request.
|
||||
*
|
||||
* @static
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public static function isAjaxRequest()
|
||||
{
|
||||
return isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest';
|
||||
}
|
||||
|
||||
/**
|
||||
* Set viewType.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user