Admin related functions.
Example
var adminLib = require('/lib/xp/admin');
Methods
(static) getAssetsUri() → {string}
Returns the admin assets uri.
Returns:
Assets uri.
- Type
- string
(static) getBaseUri() → {string}
Returns the admin base uri.
Returns:
Admin base uri.
- Type
- string
(static) getHomeToolUrl(paramsopt) → {string}
Returns the URL for the Home admin tool.
Parameters:
Name | Type | Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
object |
<optional> |
Parameter object Properties
|
Returns:
URL.
- Type
- string
(static) getInstallation() → {string}
Returns installation name.
Returns:
Installation name.
- Type
- string
(static) getLauncherPath() → {string}
Returns the URL for launcher javascript.
Returns:
Path.
- Type
- string
(static) getLauncherUrl() → {string}
Returns the URL for launcher panel.
Returns:
URL.
- Type
- string
(static) getLocale() → {string}
Returns the preferred locale based on the current HTTP request, or the server default locale if none is specified.
Returns:
Current locale.
- Type
- string
(static) getLocales() → {Array.<string>}
Returns the list of preferred locales based on the current HTTP request, or the server default locale if none is specified.
Returns:
Current locales in order of preference.
- Type
- Array.<string>
(static) getPhrases() → {object}
Returns all i18n phrases.
Returns:
JSON object with phrases.
- Type
- object
(static) getToolUrl(application, tool) → {string}
Returns the URL for an admin tool of specific application.
Parameters:
Name | Type | Description |
---|---|---|
application |
string | Full application name (f.ex, 'com.enonic.app') |
tool |
string | Name of the tool inside an app (f.ex, 'main') |
Returns:
URL.
- Type
- string
(static) getVersion() → {string}
Returns version of XP installation.
Returns:
Version.
- Type
- string