- Модуль: main
- Путь к файлу: ~/bitrix/modules/main/lib/page/asset.php
- Класс: BitrixMainPageAsset
- Вызов: Asset::isKernelJS
function isKernelJS($js)
{
/** If optimisation off */
if (!($this->sliceKernel() && $this->optimizeJs()))
{
return (strncmp($js, '/bitrix/js/', 11) == 0);
}
/** If optimization on */
if (array_key_exists($js, $this->kernelAsset['JS']))
{
return $this->moduleInfo['JS'][$this->kernelAsset['JS'][$js]];
}
elseif (strncmp($js, '/bitrix/js/', 11) == 0)
{
$tmp = explode('/', $js);
$moduleID = $tmp['3'];
unset($tmp);
if (empty($moduleID))
{
return false;
}
return [
'MODULE_ID' => $moduleID.'_'.$this->assetJSCnt++,
'BODY' => false,
'FILES_INFO' => false,
'IS_KERNEL' => true,
'DATA' => '',
'SKIP' => true
];
}
return false;
}