/** * detects mobile platform and attaches all needed javascript files */ protected function _Init() { if (self::$isAlreadyInit) { return; } $GLOBALS["BITRIX_PLATFORM"] = self::$platform; $GLOBALS["BITRIX_API_VERSION"] = self::$apiVersion; AddEventHandler("main", "OnBeforeEndBufferContent", array("CMobile", "initScripts")); self::$isAlreadyInit = true; }
/** * detects mobile platform and attaches all needed javascript files */ protected function _Init() { if (self::$isAlreadyInit) { return; } $GLOBALS["BITRIX_PLATFORM"] = self::$platform; $GLOBALS["BITRIX_API_VERSION"] = self::$apiVersion; AddEventHandler("main", "OnBeforeEndBufferContent", array("CMobile", "initScripts")); self::$isAlreadyInit = true; $db_events = GetModuleEvents("mobileapp", "OnMobileInit"); while ($arEvent = $db_events->Fetch()) { ExecuteModuleEventEx($arEvent); } }