diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-01-08 17:02:31 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-01-08 17:02:31 -0500 |
commit | 07f9700179da74b056485375652c3b26d6fbce0d (patch) | |
tree | 027408d8895514daa33297d1fbfdda7f26f3dc1c /doc | |
parent | 17ac414d744155d77c729f150115e8fd9e18f285 (diff) |
Offer the possibility to define version compatibility from plugins
Diffstat (limited to 'doc')
-rw-r--r-- | doc/plugin-registration.markdown | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/plugin-registration.markdown b/doc/plugin-registration.markdown index 2c80aab3..5a4a6234 100644 --- a/doc/plugin-registration.markdown +++ b/doc/plugin-registration.markdown @@ -71,6 +71,15 @@ class Plugin extends Base { $this->template->hook->attach('template:layout:head', 'theme:layout/head'); } + + public function getCompatibleVersion() + { + // Examples: + // >=1.0.37 + // <1.0.37 + // <=1.0.37 + return '1.0.37'; + } } ``` @@ -93,6 +102,7 @@ Available methods from `Kanboard\Core\Plugin\Base`: - `getPluginHomepage()`: Should return plugin Homepage (link) - `setContentSecurityPolicy(array $rules)`: Override default HTTP CSP rules - `onStartup()`: If present, this method is executed automatically when the event "app.bootstrap" is triggered +- `getCompatibleVersion()`: You may want to specify the Kanboard version compatible with the plugin Your plugin registration class can also inherit from Kanboard\Core\Base, that way you can access all classes and methods of Kanboard easily. |