• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/lib/Integration/UI/EntityEditor/PropertyProvider.php
  • Класс: BitrixIblockIntegrationUIEntityEditorPropertyProvider
  • Вызов: PropertyProvider::getLinkIblockIdItems
private function getLinkIblockIdItems(): array
{
	$result = [];

	$filter = [
		'=ACTIVE' => 'Y',
	];

	$iblockId = ($this->entity['IBLOCK_ID'] ?? 0);
	if ($iblockId > 0)
	{
		$filter['!=ID'] = $iblockId;
	}

	$rows = IblockTable::getList([
		'select' => [
			'ID',
			'NAME',
			'TYPE_NAME' => 'TYPE.LANG_MESSAGE.NAME',
		],
		'filter' => $filter,
	]);
	foreach ($rows as $row)
	{
		$result[] = [
			'NAME' => "{$row['TYPE_NAME']}. {$row['NAME']}",
			'VALUE' => $row['ID'],
		];
	}

	return $result;
}