settings
get(namespace, key, [defaultValue])⇒ *
*
Get a value for a specific setting. Return null, or default value when specified when not existing.
Parameters
Param | Type | Default | Description |
---|---|---|---|
namespace |
| Required - Plugin name, or namespace of saved setting value | |
key |
| Required - Key where setting is saved | |
defaultValue |
|
| Default return value if key is not found in namespace |
set(namespace, key, value)⇒ boolean
boolean
Set a value for a specific setting, transformed into JSON. Returns true on success, false on failure.
Parameters
Param | Type | Description |
---|---|---|
namespace |
| Required - Plugin name or custom namespace where to save setting |
key |
| Required - Which key to use to save setting value |
value |
| Required - Value of setting |
delete(namespace, key)⇒ boolean
boolean
Delete a specific setting. Returns true on success, false on failure.
Parameters
Param | Type |
---|---|
namespace |
|
key |
|
getAllSettings(namespace)⇒ *
*
Retrieve all settings stored. Returns false on failure, object on success.
Parameters
Param | Type | Description |
---|---|---|
namespace |
| Required - Plugin name or custom namespace where to save setting |
Last updated