string system.branch
Returns the git branch of the IFE installation.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
system.branch // => 'master'
... |
string system.
getCache(key)Looks up a given key in the cache and returns it if available.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
system.getCache('a cache key') // => 'some cached content'
... |
Parameter key:string (required)
The key to look up in the cache.
string system.host
Returns the hostname that is set up in the IFE configuration.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
system.host // => 'https://example.com'
... |
boolean system.isCacheActive()
Returns true, if the cache is active, otherwise false.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
if (system.isCacheActive() === true)
{
...
}
... |
boolean system.isDeveloperCacheActive ()
Returns true, if the developer cache is active, otherwise false.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
if (system.isDeveloperCacheActive () === true)
{
...
}
... |
object[] system.jsmas
Returns a list of objects describing the available jsmas, their methods and arguments.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
system.jsmas // => [{ name: 'address', methods: [{ method: 'update', parameters: [['req', 'attributes']] }] }, ...]
... |
string system.minifyCSS ()
Returns a minified version of CSS
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
var minCSS = system.minifyCSS();
... |
string system.minifyJS ()
Returns a minified version of JS
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
var minJS = system.minifyJS();
... |
string system.name
Returns the Backend-Title from the IFE configuration.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
var sysName = system.name(); // => 'IFE ... Staging'
... |
system.now()
Returns the current time in nanoseconds.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
system.now() // => 1476801294345673109
... |
string system.releaseDate
Returns the date of the deployment of the current installation.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
system.releaseDate // => '2016-10-18'
... |
string system.revision
Returns the git commit hash of the current installation
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
system.revision // => 'a026cc7'
... |
system.setCache(key, value, [expiration])
Writes a given value to the cache using the given cache key. Optionally allows for expiration of a cache value.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
system.setCache('a-cache-key', 'some
content', 600);
... |
Parameter key:string (required)
The desired cache keyParameter value:string (required)
The content to be cached.
Parameter expiration (optional, default: 0 = permanent)
The amount of seconds until the cache entry expiresstring system.version
The full version string. (Version branch revision releaseDate)
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
system.version // => "4.1.0 master a026cc7 2016-10-18"
... |
string system.versionNumber
The version number
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
system.versionNumber // => '4.1.0'
... |