• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/block.php
  • Класс: BitrixLandingBlock
  • Вызов: Block::getAjaxInitiatedAssets
static function getAjaxInitiatedAssets()
{
	Asset::getInstance()->getJs();
	Asset::getInstance()->getCss();
	Asset::getInstance()->getStrings();

	$targetTypeList = array('JS', 'CSS');
	$CSSList = $JSList = $stringsList = [];

	foreach ($targetTypeList as $targetType)
	{
		$targetAssetList = Asset::getInstance()->getTargetList($targetType);

		foreach ($targetAssetList as $targetAsset)
		{
			$assetInfo = Asset::getInstance()->getAssetInfo($targetAsset['NAME'], BitrixMainPageAssetMode::ALL);

			if (!empty($assetInfo['JS']))
			{
				$JSList = array_merge($JSList, $assetInfo['JS']);
			}

			if (!empty($assetInfo['CSS']))
			{
				$CSSList = array_merge($CSSList, $assetInfo['CSS']);
			}

			if (!empty($assetInfo['STRINGS']))
			{
				$stringsList = array_merge($stringsList, $assetInfo['STRINGS']);
			}
		}
	}

	return [
		'js' => array_unique($JSList),
		'css' => array_unique($CSSList),
		'strings' => array_unique($stringsList),
	];
}