import {BrandingEngine} from 'arva-js/components/logic/branding/BrandingEngine.js'
BrandingEngine
Constructor Summary
Public Constructor | ||
public |
constructor(dataSource: undefined) |
Method Summary
Public Methods | ||
public |
Get a branding option value by its name. |
|
public |
getAll(): * Gets all branding options for the current brand. |
|
public |
Set one branding option manually. |
|
public |
setOptions(options: Object): void Set the branding options manually. |
|
public |
Sets the branding options using the local cache and an external dataSource. |
Public Constructors
Public Methods
public get(optionName: String): * source
Get a branding option value by its name.
Params:
Name | Type | Attribute | Description |
optionName | String | Name of the option to fetch. |
Return:
* | Option |
public setOption(optionName: String, value: *): void source
Set one branding option manually.
Params:
Name | Type | Attribute | Description |
optionName | String | Name of the option to fetch. |
|
value | * | Value to set the option to. |
Return:
void |
public setOptions(options: Object): void source
Set the branding options manually.
Params:
Name | Type | Attribute | Description |
options | Object | Dictionary object with wanted branding options. Example: {textColor: 'black', backgroundColor: 'white'} |
Return:
void |
public setOptionsFromDataSource(): Promise source
Sets the branding options using the local cache and an external dataSource. If a cached version is present, it is used to populate the options, and the function is resolved immediately. Otherwise, the options are populated from the external dataSource. In both cases, the latest options are fetched from the dataSource and saved to cache for use on the next app launch.
Return:
Promise | A promise that is resolved when the branding options have been fetched from cache or remote storage. |