/** * Returns true if current request was initiated by Ajax. * * @return boolean */ public static function isAjaxRequest() { if (self::$isAjaxRequest == null) { $actionType = Context::getCurrent()->getServer()->get("HTTP_BX_ACTION_TYPE"); self::$isAjaxRequest = $actionType == "get_dynamic" || defined("actionType") && constant("actionType") == "get_dynamic"; } return self::$isAjaxRequest; }
/** * Sets useAppCache property * @param bool $useAppCache */ public static function setUseAppCache($useAppCache = true) { self::$useAppCache = $useAppCache; }