Constructor
new Plugins(logger)
Parameters:
Name | Type | Description |
---|---|---|
logger |
object | Logger to be used |
- Source:
Methods
getPluginConfig(namespace, callback)
Returns plugin configuration from core database for given plugin
Parameters:
Name | Type | Description |
---|---|---|
namespace |
string | plugin namespace, the config shall be returned for |
callback |
function | json containing the plugin configuration (field configstore from core database) |
- Source:
getPluginConfigFormCode(config, state, namespace) → {string}
Returns HTML-Form for the plugin configuration for plugin with given namespace
Parameters:
Name | Type | Description |
---|---|---|
config |
object | configstore array for plugin to be rendered as html form |
state |
integer | Active State of plugin (1/0) |
namespace |
string | namespace of plugin the html form shall be rendered for |
- Source:
Returns:
HTML Code for the edit form for plugin configuration
- Type
- string
getPluginManifestForNameSpace(namespace) → {object}
returns manifest object for a given plugin
Parameters:
Name | Type | Description |
---|---|---|
namespace |
string |
- Source:
Returns:
manifest object or null if not found
- Type
- object
getPluginsConsumingFCMTokens(callback)
Returns list of plugins which consume fcm tokens from coredatabase
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | rows or null |
- Source:
getPluginsList(callback)
Returns list of all plugins registered in core database
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | rows or null |
- Source:
resetManifestForNamespace(namespace)
Resets the plugin configuration in core database to factory defaults out of the manifest file of plugin
Parameters:
Name | Type | Description |
---|---|---|
namespace |
string | namespace of the plugin the configuration shall be resetted to factory default |
- Source:
setPluginConfig(namespace, reqBody, callback)
Writes plugin configuration to core database
Parameters:
Name | Type | Description |
---|---|---|
namespace |
string | namespace of plugin the config shall be updated / set for |
reqBody |
object | form Data (usually req.form) |
callback |
function | success (true or false) |
- Source: