• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/link/html/entitylink.php
  • Класс: BitrixSaleLinkHtmlEntityLink
  • Вызов: EntityLink::getLabel
private function getLabel(): string
{
	// we process orders separately, because the factory does not know how to work with items.
	if ($this->entityTypeId === CCrmOwnerType::Order)
	{
		$description = CCrmOwnerType::GetDescription($this->entityTypeId);

		return "{$description} #{$this->entityId}";
	}

	$factory = Container::getInstance()->getFactory($this->entityTypeId);
	if ($factory)
	{
		$item = $factory->getItem($this->entityId);
		if ($item)
		{
			$title = $item->getHeading();
			if ($title)
			{
				return $title;
			}
		}
	}

	return $this->entityId;
}