##Create a plugin
- Choose a plugin name (referenced here as "{plugin}")
- Create directory {plugin} in /src/plugin/
- Name class and file {plugin} in /src/plugin/{plugin}/
- Make sure the class implements the \IPlugin interface
- If you want it to be able to hook to the admin panel, also implement \plugin\Admin\IAdminPanel
###Hook to public cms url
- create public function HookRootAccess($method){}
- The method should return true if the requested url is implemented in the plugin
/**
* @return bool
*/
public function HookRootAccess($method){
return strtolower($method) == 'yoururl';
}
###Create admin panel menu
/**
* @return \NavigationItem[]
*/
public function HookAdminItems()
{
return array(
new \NavigationItem(...)
);
}
###Add user permission
/**
* @return \plugin\Authentication\model\Permission[]
*/
public function HookUserPermissions()
{
return array(
new \plugin\Authentication\model\Permission(...)
);
}