This is the application model.
- Source:
Requires
- module:spearfishHelpers
- module:managers/timer-manager
- module:common/services
- module:ldash
- module:moment
Methods
-
init()
-
Initializes class
- Source:
Fires:
- event:assignListeners()
- event:loadJson()
-
assignListeners()
-
Assigns listeners to events used in this class.
- Source:
Listens to Events:
- event:EVENT_INTERACTION_BLOCK_STATE
- event:EVENT_MODEL_READY
-
getInteractionBlockState()
-
Getter for block state
- Source:
Returns:
interactionBlockState
- Type
- Boolean
-
getDebugMode()
-
Getter for debug state
- Source:
Returns:
debug
- Type
- Boolean
-
setTestMode(testData)
-
Sets the application state to test mode
Parameters:
Name Type Description testDataObject Data required for any method to make use of the test mode
- Source:
Fires:
- event:EVENT_TEST_MODE_STATE_CHANGE
-
loadJson()
-
loads the configuration JSON files. This includes 'core-config.json' and 'project.json'. 'project.json' will override the 'core-config.json' content.
- Source:
Fires:
- event:EVENT_JSON_LOADED
- event:EVENT_LANGUAGE_SET
-
manageEnv()
-
Environment dependent data is applied from the 'project.json' 'environment' node
- Source:
Fires:
- event:onModelReady()
-
getManifest()
-
Getter for Prsonas manifest json
- Source:
Returns:
Prsonas manifest
- Type
- Object
-
getReturnObj()
-
Returns generic return object
- Source:
Returns:
- Type
- Object
Example
{ "status": "ok", "data": {} } -
onModelReady()
-
Called when model is ready
- Source:
Fires:
- event:EVENT_MODEL_READY