Plugin.cfc - Mura Docs v6

Plugin.cfc

The /plugin/plugin.cfc allows developers to run code that is needed to properly install, update or delete their plugin.

/MyFirstPlugin/plugin/plugin.cfc

component extends="mura.plugin.plugincfc" {
public any function install(){
//Do custom installation stuff
super.install();
}
public any function update() {
//Do custom update stuff
super.update();
}
public any function delete() {
//Do custom installation stuff
super.delete();
}
public any function toBundle() {
}
public any function fromBundle() {
}
}

Each of the first three functions (install(), update() and delete()) is run when the plugin is respectively installed, updated or deleted. When a site manager creates a site bundle and includes the plugin within the bundle, the toBundle() and fromBundle() functions are also appropriately run.