• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/dataloader/landing.php
  • Класс: BitrixLandingDataLoaderLanding
  • Вызов: Landing::getMetadata
protected function getMetadata(array $ids)
{
	$images = [];
	$res = BitrixLandingInternalsHookDataTable::getList([
		'select' => [
			'VALUE', 'ENTITY_ID', 'CODE'
		],
		'filter' => [
			'=HOOK' => 'METAOG',
			'=CODE' => ['IMAGE', 'DESCRIPTION'],
			'=PUBLIC' => Hook::getEditMode() ? 'N' : 'Y',
			'=ENTITY_TYPE' => Hook::ENTITY_TYPE_LANDING,
			'ENTITY_ID' => $ids
		]
	]);
	while ($row = $res->fetch())
	{
		if (!isset($images[$row['ENTITY_ID']]))
		{
			$images[$row['ENTITY_ID']] = [];
		}
		if ($row['CODE'] == 'IMAGE')
		{
			if (intval($row['VALUE']) > 0)
			{
				$row['VALUE'] = BitrixLandingFile::getFilePath($row['VALUE']);
			}
		}
		$images[$row['ENTITY_ID']][$row['CODE']] = $row['VALUE'];
	}

	return $images;
}