/** * detects mobile platform and attaches all needed javascript files */ protected function _Init() { if (self::$isAlreadyInit) { return; } header("BX-Cordova-Version: " . self::$supportedCordovaVersion); $GLOBALS["BITRIX_PLATFORM"] = self::$platform; $GLOBALS["BITRIX_API_VERSION"] = self::$apiVersion; AddEventHandler("main", "OnBeforeEndBufferContent", array(__CLASS__, "initScripts")); AddEventHandler("main", "OnEpilog", array($this, "onMobileInit")); self::$isAlreadyInit = true; }
/** * detects mobile platform and attaches all needed javascript files */ protected function _Init() { if (self::$isAlreadyInit) { return; } header("BX-Cordova-Version: " . self::$supportedCordovaVersion); $GLOBALS["BITRIX_PLATFORM"] = self::$platform; $GLOBALS["BITRIX_API_VERSION"] = self::$apiVersion; AddEventHandler("main", "OnBeforeEndBufferContent", array(__CLASS__, "initScripts")); AddEventHandler("main", "OnEpilog", array($this, "onMobileInit")); self::$isAlreadyInit = true; $db_events = getModuleEvents("mobileapp", "OnMobileInit"); while ($arEvent = $db_events->Fetch()) { ExecuteModuleEventEx($arEvent); } }