• Модуль: intranet
  • Путь к файлу: ~/bitrix/modules/intranet/lib/integration/main/uiselector/departments.php
  • Класс: BitrixIntranetIntegrationMainUISelectorDepartments
  • Вызов: Departments::getItemName
public function getItemName($itemCode = '')
{
	$result = '';

	$entityId = (
		preg_match('/^DR(d+)$/i', $itemCode, $matches)
		&& intval($matches[1]) > 0
			? intval($matches[1])
			: 0
	);

	if (
		$entityId  > 0
		&& !self::isExtranetUser()
	)
	{
		$res = CIntranetUtils::getDepartmentsData(array($entityId));
		if (
			!empty($res)
			&& !empty($res[$entityId])
		)
		{
			$result =  $res[$entityId];
		}
	}

	return $result;
}