• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Service/Router.php
  • Класс: Bitrix\Crm\Service\Router
  • Вызов: Router::getCalendarUrlWithOldRouting
protected function getCalendarUrlWithOldRouting(int $entityTypeId, int $categoryId = null): ?Uri
{
	if ($entityTypeId === \CCrmOwnerType::Deal && !is_null($categoryId))
	{
		$template = Option::get(self::MODULE_ID, 'path_to_deal_category_calendar');

		return new Uri(\CComponentEngine::makePathFromTemplate($template, ['category_id' => $categoryId]));
	}

	// to Deal/Lead
	$entityName = mb_strtolower(\CCrmOwnerType::ResolveName($entityTypeId));
	$template = Option::get(static::MODULE_ID, "path_to_{$entityName}_calendar");
	if (empty($template))
	{
		return null;
	}

	return new Uri(\CComponentEngine::makePathFromTemplate($template));
}