The "plugin.cfc" File
If this file exists, Mura will attempt to invoke specific methods during various phases of the plugin deployment, update, and/or deletion lifecycles. This allows developers to do things such as create custom database tables, connect to your custom API for authentication, and more.
The example code below illustrates a basic plugin.cfc file.
component extends='mura.plugin.plugincfc' output=false {
// pluginConfig is automatically available as variables.pluginConfig
public void function install() {
// Do custom installation stuff
}
public void function update() {
// Do custom update stuff
}
public void function delete() {
// Do custom delete stuff
}
public void function toBundle(pluginConfig, bundle, siteid) output=false {
// Do custom toBundle stuff
}
public void function fromBundle(bundle, keyFactory, siteid) output=false {
// Do custom fromBundle stuff
}
}