trait SettingsTrait

This is a class holding convienence methods to access settings from core objects.

Settings exist at the key, link, and context. Link settings are the most common.

Properties

$settingsDebugArray

Methods

settingsGetAll()

Retrieve an array of all of the settings

settingsGet($key, $default = false)

Retrieve a particular key from the settings.

settingsSet($key, $value)

Update a single key in settings

settingsUpdate($keyvals)

Set or update a number of keys to new values in link settings.

settingsSetAll($new_settings)

Replace all the settings (Dangerous)

settingsDebug()

Retrieve the debug array for the last operation.

Details

at line 23
settingsGetAll()

Retrieve an array of all of the settings

If there are no settings, return an empty array.

at line 70
settingsGet($key, $default = false)

Retrieve a particular key from the settings.

Returns the value found in settings or false if the key was not found.

Parameters

$key
  • The key to get from the settings.
$default
  • What to return if the key is not present

at line 83
settingsSet($key, $value)

Update a single key in settings

Parameters

$key
$value

at line 96
settingsUpdate($keyvals)

Set or update a number of keys to new values in link settings.

Parameters

$keyvals

at line 119
protected settingsSetAll($new_settings)

Replace all the settings (Dangerous)

Parameters

$new_settings

at line 155
settingsDebug()

Retrieve the debug array for the last operation.