Skip to content

Plugins

Timot Tarjani edited this page Jan 14, 2017 · 15 revisions

###Plugin structure

Plugins are in the plugins dir. The plugin dir should be PSR-2 compatible, because the system loads the plugin by namespace. The plugin should contain a theme_info.xml file and Register.php file.

###Plugin Register file. In the Register.php file you can specify components that the system should load automatically.

####Extending the menu In Register.php create a public static method called navigation. It must return an array with the menu items information.

For example:

public static function navigation(){
		return [
			'googlemaps' => [
					'label' => 'Google Maps',
					'url' => 'admin/plugin/run/googlemaps',
					'submenu_of' => 'pages'
					]
		];
}

Clone this wiki locally