Plugin interface

A JavaScript object implementing the Plugin interface acts as a plugin to the Haplo Platform.

Construction

Implement plugin

Note that this interface is slightly different to other interfaces in that you define some of the behaviours of this object by overriding functions.

Plugin interfaces

The Plugin object is the means for your code to integrate into the Platform, and as such, has several different areas of responsibility. These have been broken down into separate pages for clarity.

Platform interface

The core platform interface provides the key hook() function for receiving notifications of events, and high level interfaces for various integration points.

Data and databases

Your plugin object provides data storage facilities to store arbitrary data outside the main object store.

Bundled files

Arbitrary files can be bundled inside your plugin in the file directory, then loaded as BinaryFile objects.

Lifecycle

Your plugin’s lifecycle functions are called at various key moments.

Request handling

To provide your plugin’s user interface, you use request handlers to respond to requests from the user.

During the process of handling a request, various request callbacks are called.

Response generation

The plugin object provides HTML templates, and other response generation features.

Forms

The plugin object creates form descriptions and data sources.

Internationalisation

The plugin object provides access to the platform internationalisation API.

Properties

property pluginName

The name of the plugin, as defined in the plugin.json file.

Miscellaneous features

Auditing