Skip to content
Justin Campo edited this page Oct 24, 2015 · 1 revision

##Overview If a part of website could be used on multiple sites it should be made into a plugin.

##Loading Plugins are loaded into the system via the xesm_plugin database table.

##File Requirements All plugins should be in their own folder. Each plugin is required to have an init.php file which holds a init class

##Init When the plugin is getting load the class init gets created. The class constructor should handle the reset of the class setup.

public function __construct($c)
{
    $this->c = $c;
    $this->c->assign("form",function ($c) { return new \plugin\form\form($c); });
    $this->c->assign("form_item",function ($c) { return new \plugin\form\form_item(); });
    $this->c->assign("form_js",function ($c) { return new \plugin\form\form_js(); });
    $this->c->factory("form_item");
}
Clone this wiki locally