• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/lib/landingsource/element.php
  • Класс: BitrixIblockLandingSourceElement
  • Вызов: Element::getCatalogs
static function getCatalogs(array $iblocks = [])
{
	$result = [];
	if (self::$catalogIncluded === null)
		self::$catalogIncluded = Loader::includeModule('catalog');
	if (self::$catalogIncluded)
	{
		$filter = [];
		if (!empty($iblocks))
			$filter['@IBLOCK_ID'] = $iblocks;

		$iterator = CatalogCatalogIblockTable::getList([
			'select' => ['IBLOCK_ID'],
			'filter' => $filter
		]);
		while ($row = $iterator->fetch())
			$result[] = (int)$row['IBLOCK_ID'];
		unset($row, $iterator, $filter);
	}
	return $result;
}