• Модуль: imopenlines
  • Путь к файлу: ~/bitrix/modules/imopenlines/lib/crm/common.php
  • Класс: BitrixImOpenLinesCrmCommon
  • Вызов: Common::getLink
static function getLink($type, $id = null)
{
	$result = false;

	if (Loader::includeModule('crm'))
	{
		$defaultValue = false;
		if (is_null($id))
		{
			$defaultValue = true;
			//hack
			$id = 0;
		}

		$result = CCrmOwnerType::GetEntityShowPath(CCrmOwnerType::ResolveID($type), $id, false);

		if ($defaultValue)
		{
			$result = str_replace($id, '#ID#', $result);
		}
	}

	return $result;
}