Bitrix API

Router

Table of Contents

Constants

LIST_VIEW_ACTIVITY  = \Bitrix\Crm\Settings\EntityViewSettings::ACTIVITY_VIEW_NAME
LIST_VIEW_CALENDAR  = \Bitrix\Crm\Settings\EntityViewSettings::CALENDAR_VIEW_NAME
LIST_VIEW_DEADLINES  = \Bitrix\Crm\Settings\EntityViewSettings::DEADLINES_VIEW_NAME
LIST_VIEW_KANBAN  = \Bitrix\Crm\Settings\EntityViewSettings::KANBAN_VIEW_NAME
LIST_VIEW_LIST  = \Bitrix\Crm\Settings\EntityViewSettings::LIST_VIEW_NAME

Methods

__construct()  : mixed
checkAndUpdateCurrentListView()  : void
getActivityUrl()  : Uri|null
getAutomatedSolutionDetailUrl()  : Uri|null
getAutomatedSolutionListUrl()  : Uri|null
getAutomationUrl()  : Uri|null
getAutomationUrlTemplate()  : string|null
getCalendarUrl()  : Uri|null
getCategoryListUrl()  : Uri|null
getChildrenItemsListUrl()  : Uri|null
getConsistentUrlFromPartlyDefined()  : Uri|null
getContactCenterUrl()  : Uri|null
getCurrentListView()  : string
getCurrentListViewInCustomSection()  : string
getCustomRoots()  : array<string|int, mixed>
getCustomRootsWithoutPages()  : array<string|int, mixed>
getCustomUrlTemplates()  : array<string|int, mixed>
getDeadlinesUrl()  : Uri|null
getDefaultComponent()  : string
getDefaultComponentParameters()  : array<string|int, mixed>
getDefaultListView()  : string
getDefaultRoot()  : string
getDefaultUrlTemplates()  : array<string|int, mixed>
getEntityMergeUrl()  : Uri|null
getEntityPermissionsUrl()  : Uri|null
Returns Uri to permissions filtered by specific entity
getEntityTypeByComponent()  : int
getEntityViewNameInCustomSection()  : string
getExternalTypeListUrl()  : Uri
getFileUrl()  : Uri
getFileUrlTemplate()  : string
getItemCopyUrl()  : Uri|null
getItemDetailComponentName()  : string|null
Return name of detail component by $entityTypeId.
getItemDetailComponentNamesMap()  : array<string|int, mixed>
getItemDetailUrl()  : Uri|null
getItemDetailUrlCompatibleTemplate()  : string|null
getItemListComponentName()  : string|null
Return name of list component by $entityTypeId.
getItemListSliderUrl()  : Uri|null
getItemListUrl()  : Uri|null
getItemListUrlInCurrentView()  : Uri|null
getItemListUrlIntoCustomSection()  : Uri|null
getKanbanUrl()  : Uri|null
getKanbanUrlIntoCustomSection()  : Uri|null
getMobileItemDetailUrl()  : Uri|null
getNumeratorSettingsUrl()  : Uri|null
getPermissionsUrl()  : Uri|null
Returns Uri to all CRM permissions
getPreparedTemplates()  : array<string|int, mixed>
getProductDetailUrl()  : Uri
getProductDetailUrlTemplate()  : string
getProductEditUrl()  : Uri
getProductEditUrlTemplate()  : string
getQuotePdfUrl()  : Uri
getQuotePrintUrl()  : Uri
getReportsUrl()  : Uri|null
getRoot()  : string
getSiteId()  : string|null
getSystemPageCode()  : string|null
getTemplatesForJsRouter()  : array<string|int, array<string|int, mixed>>
Returns templates for the frontend crm router
getTypeDetailUrl()  : Uri|null
getTypeListUrl()  : Uri|null
getUserFieldDetailUrl()  : Uri|null
getUserFieldListUrl()  : Uri|null
getUserPersonalUrl()  : Uri
getUserPersonalUrlTemplate()  : string|null
isNewRoutingForAutomationEnabled()  : bool
isNewRoutingForDetailEnabled()  : bool
Returns true is this entity uses new routing in item detail urls generation
isNewRoutingForListEnabled()  : bool
Returns true if this entity uses new routing in item lists or kanban urls generation
isSefMode()  : bool
parseRequest()  : ParseResult
reInit()  : $this
Re-initialize router
resolveComponentEngineCallback()  : false|string
saveCustomUrlTemplates()  : void
setCurrentListView()  : Router
setCurrentListViewInCustomSection()  : self
setCustomRoots()  : self
setCustomRootsWithoutPages()  : self
setDefaultComponent()  : self
setDefaultComponentParameters()  : self
setDefaultListView()  : void
setRoot()  : Router
setSefMode()  : Router
setSiteId()  : Router
signChildrenItemsComponentParams()  : string
unsignChildrenItemsComponentParams()  : array<string|int, mixed>|null

Constants

LIST_VIEW_ACTIVITY

public mixed LIST_VIEW_ACTIVITY = \Bitrix\Crm\Settings\EntityViewSettings::ACTIVITY_VIEW_NAME

LIST_VIEW_CALENDAR

public mixed LIST_VIEW_CALENDAR = \Bitrix\Crm\Settings\EntityViewSettings::CALENDAR_VIEW_NAME

LIST_VIEW_DEADLINES

public mixed LIST_VIEW_DEADLINES = \Bitrix\Crm\Settings\EntityViewSettings::DEADLINES_VIEW_NAME

LIST_VIEW_KANBAN

public mixed LIST_VIEW_KANBAN = \Bitrix\Crm\Settings\EntityViewSettings::KANBAN_VIEW_NAME

LIST_VIEW_LIST

public mixed LIST_VIEW_LIST = \Bitrix\Crm\Settings\EntityViewSettings::LIST_VIEW_NAME

Methods

__construct()

public __construct() : mixed

checkAndUpdateCurrentListView()

public checkAndUpdateCurrentListView(string $desiredListView, int $entityTypeId[, int $categoryId = null ]) : void
Parameters
$desiredListView : string
$entityTypeId : int
$categoryId : int = null

getActivityUrl()

public getActivityUrl(int $entityTypeId[, int $categoryId = null ]) : Uri|null
Parameters
$entityTypeId : int
$categoryId : int = null
Return values
Uri|null

getAutomatedSolutionDetailUrl()

public getAutomatedSolutionDetailUrl(int $automatedSolutionId) : Uri|null
Parameters
$automatedSolutionId : int
Return values
Uri|null

getAutomatedSolutionListUrl()

public getAutomatedSolutionListUrl() : Uri|null
Return values
Uri|null

getAutomationUrl()

public getAutomationUrl(int $entityTypeId[, int $categoryId = null ]) : Uri|null
Parameters
$entityTypeId : int
$categoryId : int = null
Return values
Uri|null

getAutomationUrlTemplate()

public getAutomationUrlTemplate(int $entityTypeId) : string|null
Parameters
$entityTypeId : int
Return values
string|null

getCalendarUrl()

public getCalendarUrl(int $entityTypeId[, int $categoryId = null ]) : Uri|null
Parameters
$entityTypeId : int
$categoryId : int = null
Return values
Uri|null

getCategoryListUrl()

public getCategoryListUrl(int $entityTypeId) : Uri|null
Parameters
$entityTypeId : int
Return values
Uri|null

getChildrenItemsListUrl()

public getChildrenItemsListUrl(int $entityTypeId, int $parentEntityTypeId, int $parentEntityId) : Uri|null
Parameters
$entityTypeId : int
$parentEntityTypeId : int
$parentEntityId : int
Return values
Uri|null

getConsistentUrlFromPartlyDefined()

public getConsistentUrlFromPartlyDefined(string $currentUrl) : Uri|null
Parameters
$currentUrl : string
Return values
Uri|null

getContactCenterUrl()

public getContactCenterUrl() : Uri|null
Return values
Uri|null

getCurrentListView()

public getCurrentListView(int $entityTypeId) : string
Parameters
$entityTypeId : int
Return values
string

getCurrentListViewInCustomSection()

public getCurrentListViewInCustomSection(int $entityTypeId, string $customSectionCode) : string
Parameters
$entityTypeId : int
$customSectionCode : string
Return values
string

getCustomRoots()

public getCustomRoots() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCustomRootsWithoutPages()

public getCustomRootsWithoutPages() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCustomUrlTemplates()

public getCustomUrlTemplates() : array<string|int, mixed>
Return values
array<string|int, mixed>

getDeadlinesUrl()

public getDeadlinesUrl(int $entityTypeId[, int $categoryId = null ]) : Uri|null
Parameters
$entityTypeId : int
$categoryId : int = null
Return values
Uri|null

getDefaultComponent()

public getDefaultComponent() : string
Return values
string

getDefaultComponentParameters()

public getDefaultComponentParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>

getDefaultListView()

public getDefaultListView(int $entityTypeId) : string
Parameters
$entityTypeId : int
Return values
string

getDefaultRoot()

public getDefaultRoot() : string
Return values
string

getDefaultUrlTemplates()

public getDefaultUrlTemplates() : array<string|int, mixed>
Return values
array<string|int, mixed>

getEntityMergeUrl()

public getEntityMergeUrl(int $entityTypeId) : Uri|null
Parameters
$entityTypeId : int
Return values
Uri|null

getEntityPermissionsUrl()

Returns Uri to permissions filtered by specific entity

public getEntityPermissionsUrl(int $entityTypeId[, int|null $categoryId = null ]) : Uri|null
Parameters
$entityTypeId : int
$categoryId : int|null = null
Return values
Uri|null

getEntityTypeByComponent()

public getEntityTypeByComponent(string $componentName, array<string|int, mixed> $componentParams) : int
Parameters
$componentName : string
$componentParams : array<string|int, mixed>
Return values
int

getEntityViewNameInCustomSection()

public getEntityViewNameInCustomSection(int $entityTypeId, string $customSectionCode) : string
Parameters
$entityTypeId : int
$customSectionCode : string
Return values
string

getExternalTypeListUrl()

public getExternalTypeListUrl() : Uri
Return values
Uri

getFileUrl()

public getFileUrl(int $entityTypeId, int $id, string $fieldName, int $fileId) : Uri
Parameters
$entityTypeId : int
$id : int
$fieldName : string
$fileId : int
Return values
Uri

getFileUrlTemplate()

public getFileUrlTemplate(int $entityTypeId) : string
Parameters
$entityTypeId : int
Return values
string

getItemCopyUrl()

public getItemCopyUrl(int $entityTypeId[, int $id = 0 ][, int $categoryId = null ]) : Uri|null
Parameters
$entityTypeId : int
$id : int = 0
$categoryId : int = null
Return values
Uri|null

getItemDetailComponentName()

Return name of detail component by $entityTypeId.

public getItemDetailComponentName(int $entityTypeId) : string|null
Parameters
$entityTypeId : int
Return values
string|null

getItemDetailComponentNamesMap()

public getItemDetailComponentNamesMap() : array<string|int, mixed>
Return values
array<string|int, mixed>

getItemDetailUrl()

public getItemDetailUrl(int $entityTypeId[, int $id = 0 ][, int $categoryId = null ][, ItemIdentifier|null $parentItemIdentifier = null ]) : Uri|null
Parameters
$entityTypeId : int
$id : int = 0
$categoryId : int = null
$parentItemIdentifier : ItemIdentifier|null = null
Return values
Uri|null

getItemDetailUrlCompatibleTemplate()

public getItemDetailUrlCompatibleTemplate(int $entityTypeId) : string|null
Parameters
$entityTypeId : int
Return values
string|null

getItemListComponentName()

Return name of list component by $entityTypeId.

public getItemListComponentName(int $entityTypeId) : string|null
Parameters
$entityTypeId : int
Return values
string|null

getItemListSliderUrl()

public getItemListSliderUrl(int $entityTypeId) : Uri|null
Parameters
$entityTypeId : int
Return values
Uri|null

getItemListUrl()

public getItemListUrl(int $entityTypeId[, int $categoryId = null ]) : Uri|null
Parameters
$entityTypeId : int
$categoryId : int = null
Return values
Uri|null

getItemListUrlInCurrentView()

public getItemListUrlInCurrentView(int $entityTypeId[, int $categoryId = null ]) : Uri|null
Parameters
$entityTypeId : int
$categoryId : int = null
Return values
Uri|null

getItemListUrlIntoCustomSection()

public getItemListUrlIntoCustomSection(string $customSectionCode, int $entityTypeId[, int|null $categoryId = null ]) : Uri|null
Parameters
$customSectionCode : string
$entityTypeId : int
$categoryId : int|null = null
Return values
Uri|null

getKanbanUrl()

public getKanbanUrl(int $entityTypeId[, int $categoryId = null ]) : Uri|null
Parameters
$entityTypeId : int
$categoryId : int = null
Return values
Uri|null

getKanbanUrlIntoCustomSection()

public getKanbanUrlIntoCustomSection(string $customSectionCode, int $entityTypeId[, int|null $categoryId = null ]) : Uri|null
Parameters
$customSectionCode : string
$entityTypeId : int
$categoryId : int|null = null
Return values
Uri|null

getMobileItemDetailUrl()

public getMobileItemDetailUrl(int $entityTypeId[, int $id = 0 ]) : Uri|null
Parameters
$entityTypeId : int
$id : int = 0
Return values
Uri|null

getNumeratorSettingsUrl()

public getNumeratorSettingsUrl(int $numeratorId, string $numeratorType) : Uri|null
Parameters
$numeratorId : int
$numeratorType : string
Return values
Uri|null

getPermissionsUrl()

Returns Uri to all CRM permissions

public getPermissionsUrl() : Uri|null
Return values
Uri|null

getPreparedTemplates()

public getPreparedTemplates() : array<string|int, mixed>
Return values
array<string|int, mixed>

getProductDetailUrl()

public getProductDetailUrl([int $productId = 0 ]) : Uri
Parameters
$productId : int = 0
Return values
Uri

getProductDetailUrlTemplate()

public getProductDetailUrlTemplate() : string
Return values
string

getProductEditUrl()

public getProductEditUrl(int $productId) : Uri
Parameters
$productId : int
Return values
Uri

getProductEditUrlTemplate()

public getProductEditUrlTemplate() : string
Return values
string

getQuotePdfUrl()

public getQuotePdfUrl(int $quoteId, bool $isBlank) : Uri
Parameters
$quoteId : int
$isBlank : bool
Return values
Uri

getQuotePrintUrl()

public getQuotePrintUrl(int $quoteId, bool $isBlank) : Uri
Parameters
$quoteId : int
$isBlank : bool
Return values
Uri

getReportsUrl()

public getReportsUrl(int $entityTypeId[, int $categoryId = null ]) : Uri|null
Parameters
$entityTypeId : int
$categoryId : int = null
Return values
Uri|null

getRoot()

public getRoot() : string
Return values
string

getSiteId()

public getSiteId() : string|null
Return values
string|null

getSystemPageCode()

public getSystemPageCode(int $entityTypeId) : string|null
Parameters
$entityTypeId : int
Return values
string|null

getTemplatesForJsRouter()

Returns templates for the frontend crm router

public getTemplatesForJsRouter() : array<string|int, array<string|int, mixed>>
Return values
array<string|int, array<string|int, mixed>>

getTypeDetailUrl()

public getTypeDetailUrl(int $entityTypeId) : Uri|null
Parameters
$entityTypeId : int
Return values
Uri|null

getTypeListUrl()

public getTypeListUrl() : Uri|null
Return values
Uri|null

getUserFieldDetailUrl()

public getUserFieldDetailUrl(int $entityTypeId, int $fieldId) : Uri|null
Parameters
$entityTypeId : int
$fieldId : int
Return values
Uri|null

getUserFieldListUrl()

public getUserFieldListUrl(int $entityTypeId) : Uri|null
Parameters
$entityTypeId : int
Return values
Uri|null

getUserPersonalUrl()

public getUserPersonalUrl(int $userId) : Uri
Parameters
$userId : int
Return values
Uri

getUserPersonalUrlTemplate()

public getUserPersonalUrlTemplate() : string|null
Return values
string|null

isNewRoutingForAutomationEnabled()

public isNewRoutingForAutomationEnabled(int $entityTypeId) : bool
Parameters
$entityTypeId : int
Return values
bool

isNewRoutingForDetailEnabled()

Returns true is this entity uses new routing in item detail urls generation

public isNewRoutingForDetailEnabled(int $entityTypeId) : bool
Parameters
$entityTypeId : int
Return values
bool

isNewRoutingForListEnabled()

Returns true if this entity uses new routing in item lists or kanban urls generation

public isNewRoutingForListEnabled(int $entityTypeId) : bool
Parameters
$entityTypeId : int
Return values
bool

isSefMode()

public isSefMode() : bool
Return values
bool

parseRequest()

public parseRequest([HttpRequest $httpRequest = null ]) : ParseResult
Parameters
$httpRequest : HttpRequest = null
Return values
ParseResult

reInit()

Re-initialize router

public reInit() : $this
Return values
$this

resolveComponentEngineCallback()

public static resolveComponentEngineCallback(CComponentEngine $engine, array<string|int, mixed> $pageCandidates, array<string|int, mixed> &$pageVariables) : false|string
Parameters
$engine : CComponentEngine
$pageCandidates : array<string|int, mixed>
$pageVariables : array<string|int, mixed>
Return values
false|string

saveCustomUrlTemplates()

public saveCustomUrlTemplates(array<string|int, mixed> $templates) : void
Parameters
$templates : array<string|int, mixed>

setCurrentListView()

public setCurrentListView(int $entityTypeId, string $view) : Router
Parameters
$entityTypeId : int
$view : string
Return values
Router

setCurrentListViewInCustomSection()

public setCurrentListViewInCustomSection(int $entityTypeId, string $customSectionCode, string $view) : self
Parameters
$entityTypeId : int
$customSectionCode : string
$view : string
Return values
self

setCustomRoots()

public setCustomRoots(array<string|int, mixed> $customRoots) : self
Parameters
$customRoots : array<string|int, mixed>
Return values
self

setCustomRootsWithoutPages()

public setCustomRootsWithoutPages(array<string|int, mixed> $roots) : self
Parameters
$roots : array<string|int, mixed>
Return values
self

setDefaultComponent()

public setDefaultComponent(string $defaultComponent) : self
Parameters
$defaultComponent : string
Return values
self

setDefaultComponentParameters()

public setDefaultComponentParameters(array<string|int, mixed> $defaultComponentParameters) : self
Parameters
$defaultComponentParameters : array<string|int, mixed>
Return values
self

setDefaultListView()

public setDefaultListView(int $entityTypeId, string $view) : void
Parameters
$entityTypeId : int
$view : string

setRoot()

public setRoot(string $root) : Router
Parameters
$root : string
Return values
Router

setSefMode()

public setSefMode(bool $isSefMode) : Router
Parameters
$isSefMode : bool
Return values
Router

setSiteId()

public setSiteId(string $siteId) : Router
Parameters
$siteId : string
Return values
Router

signChildrenItemsComponentParams()

public signChildrenItemsComponentParams(int $entityTypeId, array<string|int, mixed> $componentParams) : string
Parameters
$entityTypeId : int
$componentParams : array<string|int, mixed>
Return values
string

unsignChildrenItemsComponentParams()

public unsignChildrenItemsComponentParams(int $entityTypeId, string $signedComponentParams) : array<string|int, mixed>|null
Parameters
$entityTypeId : int
$signedComponentParams : string
Return values
array<string|int, mixed>|null

        
On this page

Search results