Router frontend
It's a portion of [link=13982564]router service[/link] at the frontend.
Before use, initialize this object by template URLs.
This is done in the method \Bitrix\Crm\Component\Base::addJsRouter()
that must be called in the component template.
/** @see \Bitrix\Crm\Component\Base::addJsRouter() */ $this->getComponent()->addJsRouter($this);
At the frontend site, access to the object is performed via static property Instance
, containing actual initialized object.
Methods
setUrlTemplates(params: UrlTemplatesSettings): Router
Method | Description | Available from version |
---|---|---|
constructor(data: {}, params: {}) |
Sets URL templates. | |
setCurrentListView (entityTypeId: number, view: string): Router |
Set view type for list of items (list of kanban) for entityTypeId. | |
getCurrentListView(entityTypeId: number): string |
Returns current view type for list of items for entityTypeId. | |
static openSlider(url, options): Promise |
Static method, opens slider at the address url with options parameter.
Returns Promise, permitted after closing this slider. Resolve get object slider's BX.SidePanel.Slider .
This method is called inside other methods of this class, that open slider. | |
openTypeDetail(typeId: number, options: ?{}): ?Promise |
Opens the slider of SPA settings. | |
getTemplate(component: string, entityTypeId: number = 0): ?string |
Returns URL template for entityTypeId component, if available. | |
getTypeDetailUrl(entityTypeId: number = 0): ?Uri |
Returns URL for SPA settings page with entityTypeId. | |
getTypeListUrl(): ?Uri |
Returns URL for SPA list page | |
getItemListUrlInCurrentView(entityTypeId: number, categoryId: ?number = 0): ?Uri |
Returns URL for entityTypeId item type in the pipeline categoryId in the current view. | |
getKanbanUrl(entityTypeId: number, categoryId: ?number = 0): ?Uri |
Returns URL for the entityTypeId item list for the categoryId pipeline in the kanban view. | |
getItemListUrl(entityTypeId: number, categoryId: ?number = 0): ?Uri |
Returns URL for the entityTypeId item list for the categoryId pipeline in the list view. |
© «Bitrix24», 2001-2024