Versions Compared

Key

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

...

Code Block
languagejs
linenumberstrue
... 
content.flexAttributes
...

string content.get(key)

Returns the flex attribute for specified parameter keyvalue of key as string or null if no value is set under the key.

Example

Code Block
languagejs
linenumberstrue
... 
content.get(key)
...

Parameter key:string (required)

The key to be looked up in the flexAttributes of the content.

String content.getContentUnprocessed()

...

Code Block
languagejs
linenumberstrue
... 
content.getLockUser # => { id: 1, email: 'user@example.org' }
...

boolean content.has(key)

Checks whether a content has flex attribute with the specified parameter keyReturns a boolean value depending on whether key is present for a given content

Example

Code Block
languagejs
linenumberstrue
... 
content.has(key)
...

Parameter key:string (required)

The key to be checked in the flexAttributes of the content

content.id

Return the ID of a content

...

Code Block
languagejs
linenumberstrue
... 
content.increment(key)
...

Parameter key:string (required)

The key to be incremented in the flexAttributes of the order.

Boolean content.isLocked

Returns whether a content is currently locked.

...

content.remove(key)

Removes flex attribute for specified parameter the key from a the flexAttributes of the content

Example

Code Block
languagejs
linenumberstrue
... 
content.remove(key)
...

Parameter key:string (required)

The key to be removed from the flexAttributes of the order.

int content.revision

Returns the revision of a content

...

content.set(key, value, [options])

Sets the value of a (key, value) pair as flex attributes specified key for a given content.

Example

Code Block
languagejs
linenumberstrue
... 
content.set(key, value, [options])
...

Parameter key:string (required)

The key to be set in the flexAttributes of the content.

Parameter value:string (required)

The value to be set for the key

Parameter options:object (optional)

May have a key 'broadcastEvent':bool which determines whether the log message shows up in the websocket log view.

content.setBody(body)

Sets the body of the content to the specified parameter

...