Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

string system.branch

Returns the git branch of the IFE installation.

Example

Code Block
languagejs
linenumberstrue
... 
system.branch // => 'master'
...

string system.get(key)

Returns the value of key as string or null if no value is set under the key.

Example

Code Block
languagejs
linenumberstrue
...
var value = system.get('some.globalValue');
...

Parameter key:string (required)

The key to be looked up in the flexAttributes.

string system.host

Returns the hostname that is set up in the IFE configuration.

Example

Code Block
languagejs
linenumberstrue
... 
system.host // => 'https://example.com'
...

system.increment(key)

Increases the value of any flex attribute by 1 permanently in an atomic fashion.

Example

Code Block
languagejs
linenumberstrue
...
system.increment("some.globalCount")
...

Parameter key:string (required)

The key to be incremented in the flexAttributes.

boolean system.isCacheActive()

Returns true, if the cache is active, otherwise false.

Example

Code Block
languagejs
linenumberstrue
... 
if (system.isCacheActive() === true)
{
  ...
}
...

boolean system.isDeveloperCacheActive ()

Returns true, if the developer cache is active, otherwise false.

Example

Code Block
languagejs
linenumberstrue
... 
if (system.isDeveloperCacheActive () === true)
{
  ...
}
...

object[] system.jsmas

Returns a list of objects describing the available jsmas, their methods and arguments.

Example

Code Block
languagejs
linenumberstrue
... 
system.jsmas // => [{ name: 'address', methods: [{ method: 'update', parameters: [['req', 'attributes']] }] }, ...]
...

string system.minifyCSS ()

Returns a minified version of CSS

Example

Code Block
languagejs
linenumberstrue
... 
var minCSS = system.minifyCSS();
...

string system.minifyJS ()

Returns a minified version of JS

Example

Code Block
languagejs
linenumberstrue
... 
var minJS = system.minifyJS();
...

string system.name

Returns the Backend-Title from the IFE configuration.

Example

Code Block
languagejs
linenumberstrue
... 
var sysName = system.name(); // => 'IFE ... Staging'
...

system.now()

Returns the current time in nanoseconds.

Example

Code Block
languagejs
linenumberstrue
... 
system.now() // => 1476801294345673109
...

string system.releaseDate

Returns the date of the deployment of the current installation.

Example

Code Block
languagejs
linenumberstrue
... 
system.releaseDate // => '2016-10-18'
...

system.remove(key)

Removes the key from the flexAttributes

Example

Code Block
languagejs
linenumberstrue
...
system.remove('some.globalValue')
...

Parameter key:string (required)

The key to be removed from the flexAttributes.


string system.revision

Returns the git commit hash of the current installation

Example

Code Block
languagejs
linenumberstrue
... 
system.revision // => 'a026cc7'
...

system.set(key, value)

Sets the value of a specified key.

Example

Code Block
languagejs
linenumberstrue
...
system.set("some.globalValue", "SomeContent");
...

Parameter key:string (required)

The key to be set in the flexAttributes.

Parameter value:string (required)

The value to be set for the key

string system.version

The full version string. (Version branch revision releaseDate)

Example

Code Block
languagejs
linenumberstrue
... 
system.version // => "4.1.0 master a026cc7 2016-10-18"
...

string system.versionNumber

The version number

Example

Code Block
languagejs
linenumberstrue
... 
system.versionNumber // => '4.1.0'
...


uuid system.generateUUID()

generates a uuid


Example

Code Block
languagejs
linenumberstrue
...
var uuid  = system.generateUUID();
...