• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Service/Router.php
  • Класс: Bitrix\Crm\Service\Router
  • Вызов: Router::getItemListUrlInCurrentView
public function getItemListUrlInCurrentView(int $entityTypeId, int $categoryId = null): ?Uri
{
	$currentView = $this->getCurrentListView($entityTypeId);

	$methodMap = [
		static::LIST_VIEW_KANBAN => 'getKanbanUrl',
		static::LIST_VIEW_LIST => 'getItemListUrl',
		static::LIST_VIEW_CALENDAR => 'getCalendarUrl',
		static::LIST_VIEW_ACTIVITY => 'getActivityUrl',
		static::LIST_VIEW_DEADLINES => 'getDeadlinesUrl'
	];

	if (!isset($methodMap[$currentView]))
	{
		$currentView = $this->getDefaultListView($entityTypeId);
	}

	if (isset($methodMap[$currentView]))
	{
		$methodName = $methodMap[$currentView];

		return $this->$methodName($entityTypeId, $categoryId);
	}

	return null;
}