Skip to content
Jacob Rogaishio edited this page Mar 8, 2014 · 2 revisions

Requirements:

  • A plugin PHP class with the filename being the same as the class name. Ex. myClass.php / class myClass {
  • The plugin registered in the CMS plugin manager
  • The plugin class MUST be setup with the below variables / constructor:
class example {
	private $controller;
	public function __construct($controller) {
		$this->controller = $controller;
	}
}

Controller access:

The $this->controller gives you access to the public controller. As such you can access the public CMS core methods such as get_CONN() or get_LOG(). Please check the core section of this wiki for a complete list of core methods.

Scope access:

You can access all scopes available to the public controller via $this->controller->getScope('page'). For a list of all available scopes please check the scopes section of this wiki.

Using your plugin:

On your template index file, you can call your plugin via $this->getScope("example"). For example, if you want to call the load function of your plugin, simply use $this->getScope("example")->load()

Clone this wiki locally