From 07f9700179da74b056485375652c3b26d6fbce0d Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 8 Jan 2017 17:02:31 -0500 Subject: Offer the possibility to define version compatibility from plugins --- doc/plugin-registration.markdown | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') 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. -- cgit v1.2.3