Docs »

Plugins »

Manifests

Add new functionality to Cerb

Each plugin must have a manifest file named plugin.xml that describes its contents. This tells Cerb what kinds of new functionality the plugin is contributing.

Here’s a minimal manifest:



<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.devblocks.com/schema/plugin.xsd">
	<id>example.plugin</id>
	<name>Plugin Name</name>
	<description>This explains what your plugin does.</description>
	<author>Webgroup Media, LLC.</author>
	<version>0.0.0</version>
	<link>https://cerb.example/path/to/docs</link>
	<image>plugin.png</image>

	<requires>
		<app_version min="9.0" max="9.0.99" />
		<!--<php_extension name="curl" />-->
	</requires>

	<dependencies>
		<require plugin_id="cerberusweb.core" version="9.0.0" />
	</dependencies>

	<patches/>
	<class_loader/>
	<event_points/>
	<acl/>
	<activity_points/>
	<extensions/>
</plugin>


Plugin metadata

  • <id> is the globally unique ID of the plugin, prefixed with the author’s namespace. This should only contain lowercase letters (a-z), numbers (0-9), underscore (_), and dots (.).

  • <name> is the human-friendly name of the plugin.

  • <description> is a brief description of the purpose and contributions of the plugin.

  • <author> is the name used for attribution of the plugin’s author.

  • <version> is the semantic version of the plugin in <generation>.<major>.<minor> format. This should start with 0.0.0 and be incremented for each update.

  • <link> is a URL to the plugin’s documentation page.

  • <image> is a path to the plugin’s icon. This is relative to the plugin’s resources/ directory.

Requirements

The <requires> block specifies the requirements for installing and enabling this plugin.

This block must contain one <app_version> element specifying the minimum and maximum version of Cerb that are verified compatible with this build of the plugin.

The block may contain any number of <php_extension> elements if specific PHP extensions are required for the plugin to operate (e.g. ldap, oauth, zip).

Dependencies

The optional <dependencies> block specifies if this plugin depends on another plugin.

This block may contain any number of <require> elements specifying a required plugin_id and its minimum compatible version.

Everything else

The other elements will be covered in more detail in the subsequent sections: