trait JsonTrait

This is a class holding convienence methods to access the json column for the core objects.

This is a more general storage than the settings column.

Methods

string
getJson()

Load the json field for this entity

getJsonKey($key, $default = false)

Get a JSON key for this entity

setJson($json)

Set the JSON entry for this entity

setJsonKey($key, $value)

Set/update a JSON key for this entity

setJsonKeys($values)

Set/update an array of JSON keys for this entity

Details

at line 21
string getJson()

Load the json field for this entity

Return Value

string This returns the json string - it is not parsed - if there is nothing to return - this returns "false"

at line 41
getJsonKey($key, $default = false)

Get a JSON key for this entity

Parameters

$key
$default

at line 58
setJson($json)

Set the JSON entry for this entity

Parameters

$json

at line 75
setJsonKey($key, $value)

Set/update a JSON key for this entity

Parameters

$key
$value

at line 93
setJsonKeys($values)

Set/update an array of JSON keys for this entity

Parameters

$values