Exemple #1
0
 /**
  * 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;
 }
Exemple #2
0
 /**
  * Sets useAppCache property
  * @param bool $useAppCache
  */
 public static function setUseAppCache($useAppCache = true)
 {
     self::$useAppCache = $useAppCache;
 }