File

core/common/options.service.ts

Description

A service that allows to set or get application options which configure the default behavior of the UI.

Index

Methods

Constructor

constructor(options, systemOptionsService: SystemOptionsService, tenantOptionService: TenantOptionsService)
Parameters :
Name Type Optional
options No
systemOptionsService SystemOptionsService No
tenantOptionService TenantOptionsService No

Methods

get
get(optionKey, defaultValue?: any)

Returns an application option used to configure the UI.

Parameters :
Name Type Optional Description
optionKey No

The application options key.

defaultValue any Yes

A value to return if non is set.

Returns : any
Async getActivateSupportUser
getActivateSupportUser()

Returns if the tenant allows to show the activate-support user menu entry. Note: Only if system-level support-user/enabled is false we can activate it at tenant level.

Returns : {}
Async getSupportUrl
getSupportUrl()

Gets support url from tenant options. If response returns '404 not found' it gets the support url from application options. If the support link within application options is not provided the UI will use the system options. Is the support link explicitly set to false it will be hidden.

Returns : {}

Returns support url or false.

Async getSystemOption
getSystemOption(category: string, key: string, defaultValue?: any)

Gets a value from the system service and parses it.

Parameters :
Name Type Optional Description
category string No

The category for this option.

key string No

The key for that option.

defaultValue any Yes

The default if the option was not found.

Returns : {}
Async getTenantOption
getTenantOption(category: string, key: string, defaultValue?: any)

Gets a value from the tenant service and parses it.

Parameters :
Name Type Optional Description
category string No

The category for this option.

key string No

The key for that option.

defaultValue any Yes

The default if the option was not found.

Returns : {}
set
set(key: string, value: any)

Sets an application option.

Parameters :
Name Type Optional Description
key string No

The key to set.

value any No

The value to set.

Returns : void

result-matching ""

    No results matching ""