Documentation

UrlManager

This class performs two objectives:

  • contains set of named method for generating links;
  • defines which component with which parameters must be connected using page URL.

Options can be used to re-define page URLs.

Methods

Method Description Available from version
public function setUserId(int $userId): UrlManager Allows setting user ID $userId with defining user-dependent URLs.
public function getUserId(): int Returns user ID.
public function setRoot(string $root): UrlManager Sets root folder for generating URLs.
public function getRoot(): string Returns root folder.
public function setSefMode(bool $isSefMode): UrlManager Enables / disables "CNC" mode.
public function isSefMode(): bool Returns current mode "CNC" status.
public function setSiteId(string $siteId): UrlManager Sets site ID for generating URLs.
public function getSiteId(): ?string Returns site ID.
public function getDefaultUrlTemplates(): array Returns array of default URL templates, where name - component name and value - is an URL address.
public function saveCustomUrlTemplates(array $templates): void Allows saving own set of URL templates.
public function getCustomUrlTemplates(): array Returns array of re-defined URL templates.
public function getPreparedTemplates(): array Returns set of prepared URL templates, including root and site root.
public function parseRequest(HttpRequest $httpRequest = null): ParseResult Defines the required parameters from query $httpRequest. When not passed, current query is sourced.

Returns object Bitrix\Rpa\UrlManager\ParseResult

public function getPanelUrl(): ?Uri Returns URL for root section of module public portion.
public function getKanbanUrl(int $typeId): ?Uri Returns URL for kanban process $typeId.
public function getAutomationUrl(int $typeId = null): ?Uri Returns URL for process $typeId automation rule settings.
public function getAutomationEditRobotUrl(int $typeId = null): ?Uri Returns URL for process $typeId automation rule settings page.
public function getTypeDetailUrl(int $typeId = null): ?Uri Returns URL for process $typeId settings page.

When $typeId is not passed, it will be a link to process creation page

public function getStageDetailUrl(int $stageId = null): ?Uri Returns URL for stage $stageId settings page.

Not used.

public function getItemDetailUrl(int $typeId, int $itemId = null, int $stageId = null): ?Uri Returns URL for item $itemId details card of process $typeId.

When $itemId is not passed, it will be a URL to added item page

public function getTasksUrl(): ?Uri Returns a task list URL.
public function getTaskUrl(int $typeId, int $elementId): ?Uri Returns URL for element $elementId page of process $typeId.
public function getItemsListUrl(int $typeId): ?Uri Returns URL for item grid page of process $typeId.
public function getStageListUrl(int $typeId): Uri Returns URL for stage settings page for process $typeId.
public function getUserPersonalUrl(int $userId): Uri Returns URL for user profile $userId.
public function getFieldsListTemplateUrl(): ?string Returns URL template for user fields settings list.
public function getFieldsDetailTemplateUrl(): ?string Returns URL template for user field settings page.
public function getTypeFieldsListUrl(int $typeId): ?Uri Returns URL for list of user fields settings list for process $typeId.
public function getFieldDetailUrl(int $typeId, int $fieldId): ?Uri Returns URL for settings page of user field $fieldId of process $typeId.
public function getUserItemsUrl(int $typeId): ?Uri Returns URL for item list for the process $typeId of the same type (list or kanban) last visited by user.
public function getUserItemListView(int $typeId): ?string Returns view ID for user process $typeId item list.
public function setUserItemListView(int $typeId, string $view): UrlManager Sets view $view ID for list of user process $typeId items.

Returns $this

public function getUserTypesUrl(): ?Uri Returns URL for list of process type (list of tile) last visited by user.
public function getUserTypeListView(): ?string Returns view ID for user process list.
public function setUserTypeListView(string $view): UrlManager Sets view $view ID for user process list

Returns $this.

public function getUserItemsUrlWithTasks(int $typeId): ?Uri Returns URL for list of user process $typeId items with preset filter by item containing user tasks.
public function getUserTypesUrlWithTasks(): ?Uri< Returns URL for user process list with preset filters by processes containing user tasks.


© «Bitrix24», 2001-2022
Up