Developer / Plugins

Plugins

Last updated on 13-May-2020 by Jakob Jakobsen Boysen
Jakob Jakobsen Boysen

Platform Lead
boysen@scifeon.com

Plugins represents different extension points in Scifeon. Each plugin type serves a specific purpose, and have different capabilities. Explore the different plugins, and let us know if you need a new extension point. We will love to help.

Plugin architecture

Plugins are automatically added to Scifeon when the containing App is loaded. In general, plugins are defined in the plugins array in the contributions.json file. For each plugin type, it is described what needs to go in the plugins section, but the following holds for all plugins:

Plugins are added to the PluginManager, which in turn calls the static isMatch method with a Context-object whenever a page, panel or module queries for plugins. The Context-object typically holds information about the current entity and associated entities.

Plugin life-cycle

As Scifeon is built on the Aurelia framework, the same life-cycle methods that are used in Aurelia, are also used Scifeon plugins.

Example: PagePlugin

The following simple PagePlugin illustrates the complete life-cycle of a plugin, from initialization to navigating away from the page again.

Example: DashboardPanelPlugin

Other plugins, such as a DashboardPanel have slightly different life-cycle methods:

Read more about life-cycle methods at the Aurelia documentation.

Plugin types