本文整理汇总了PHP中CJSCore::getExtInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP CJSCore::getExtInfo方法的具体用法?PHP CJSCore::getExtInfo怎么用?PHP CJSCore::getExtInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CJSCore
的用法示例。
在下文中一共展示了CJSCore::getExtInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getData
public static function getData($SITE_ID = SITE_ID, $bFull = false)
{
global $USER, $CACHE_MANAGER;
$obCache = new CPHPCache();
$today = ConvertTimeStamp();
$cache_dir = '/intranet/planner/' . $USER->GetID();
$cache_id = 'intranet|planner|' . $USER->GetID() . '|' . $SITE_ID . '|' . intval($bFull) . '|' . $today . '|' . FORMAT_DATETIME . '|' . FORMAT_DATE . '|' . LANGUAGE_ID;
$arData = null;
if ($obCache->InitCache(self::CACHE_TTL, $cache_id, $cache_dir)) {
$arData = $obCache->GetVars();
if (is_array($arData['SCRIPTS'])) {
foreach ($arData['SCRIPTS'] as $key => $script) {
if (is_array($script)) {
$arData['SCRIPTS'][$key] = self::JS_CORE_EXT_RANDOM_NAME . RandString(5);
CJSCore::RegisterExt($arData['SCRIPTS'][$key], $script);
}
}
}
} else {
// cache expired or there's no cache
$obCache->StartDataCache();
$arData = array('SCRIPTS' => array(), 'STYLES' => array(), 'DATA' => array());
$CACHE_MANAGER->StartTagCache($cache_dir);
$CACHE_MANAGER->RegisterTag(self::CACHE_TAG . $USER->GetID());
$events = GetModuleEvents("intranet", "OnPlannerInit");
while ($arEvent = $events->Fetch()) {
$arEventData = ExecuteModuleEventEx($arEvent, array(array('SITE_ID' => SITE_ID, 'FULL' => $bFull)));
if (is_array($arEventData)) {
if (is_array($arEventData['SCRIPTS'])) {
$arData['SCRIPTS'] = array_merge($arData['SCRIPTS'], $arEventData['SCRIPTS']);
}
if (is_array($arEventData['STYLES'])) {
$arData['STYLES'] = array_merge($arData['STYLES'], $arEventData['STYLES']);
}
if (is_array($arEventData['DATA'])) {
$arData['DATA'] = array_merge($arData['DATA'], $arEventData['DATA']);
}
}
}
$arCacheData = $arData;
if (is_array($arCacheData['SCRIPTS'])) {
foreach ($arCacheData['SCRIPTS'] as $key => $script) {
if (CJSCore::IsExtRegistered($script)) {
$arCacheData['SCRIPTS'][$key] = CJSCore::getExtInfo($script);
}
}
}
$CACHE_MANAGER->EndTagCache();
$obCache->EndDataCache($arCacheData);
}
return $arData;
}