From 9ca4b43a97ae92fad57b00ac0217d5b7078272fb Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 26 Sep 2015 15:57:39 -0400 Subject: Add page to show the list of plugins --- app/Template/config/plugins.php | 24 ++++++++++++++++++++++++ app/Template/config/sidebar.php | 3 +++ 2 files changed, 27 insertions(+) create mode 100644 app/Template/config/plugins.php (limited to 'app/Template/config') diff --git a/app/Template/config/plugins.php b/app/Template/config/plugins.php new file mode 100644 index 00000000..8501bda9 --- /dev/null +++ b/app/Template/config/plugins.php @@ -0,0 +1,24 @@ + + + +

+ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/Template/config/sidebar.php b/app/Template/config/sidebar.php index ed4f01e7..4195cde1 100644 --- a/app/Template/config/sidebar.php +++ b/app/Template/config/sidebar.php @@ -4,6 +4,9 @@
  • app->getRouterAction() === 'index' ? 'class="active"' : '' ?>> url->link(t('About'), 'config', 'index') ?>
  • +
  • app->getRouterAction() === 'plugins' ? 'class="active"' : '' ?>> + url->link(t('Plugins'), 'config', 'plugins') ?> +
  • app->getRouterAction() === 'application' ? 'class="active"' : '' ?>> url->link(t('Application settings'), 'config', 'application') ?>
  • -- cgit v1.2.3 From 1fca5e721ab63d4d49e068331aee90abb111dbc2 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 26 Sep 2015 16:05:06 -0400 Subject: Add getPluginHomepage() --- app/Core/Plugin/Base.php | 13 +++++++++++++ app/Template/config/plugins.php | 8 +++++++- doc/plugins.markdown | 9 +++++---- 3 files changed, 25 insertions(+), 5 deletions(-) (limited to 'app/Template/config') diff --git a/app/Core/Plugin/Base.php b/app/Core/Plugin/Base.php index 1f61ab33..a72a0cd6 100644 --- a/app/Core/Plugin/Base.php +++ b/app/Core/Plugin/Base.php @@ -96,4 +96,17 @@ abstract class Base extends \Core\Base { return '?'; } + + /** + * Get plugin homepage + * + * This method should be overrided by your Plugin class + * + * @access public + * @return string + */ + public function getPluginHomepage() + { + return ''; + } } diff --git a/app/Template/config/plugins.php b/app/Template/config/plugins.php index 8501bda9..fea48d58 100644 --- a/app/Template/config/plugins.php +++ b/app/Template/config/plugins.php @@ -15,7 +15,13 @@ - + diff --git a/doc/plugins.markdown b/doc/plugins.markdown index a17f1af4..031bf963 100644 --- a/doc/plugins.markdown +++ b/doc/plugins.markdown @@ -70,10 +70,11 @@ Available methods from `Core\Plugin\Base`: - `initialize()`: Executed when the plugin is loaded - `getClasses()`: Return all classes that should be stored in the dependency injection container - `on($event, $callback)`: Listen on internal events -- `getPluginName()`: Get plugin name -- `getPluginAuthor()`: Get plugin author -- `getPluginVersion()`: Get plugin version -- `getPluginDescription()`: Get plugin description +- `getPluginName()`: Should return plugin name +- `getPluginAuthor()`: Should return plugin author +- `getPluginVersion()`: Should return plugin version +- `getPluginDescription()`: Should return plugin description +- `getPluginHomepage()`: Should return plugin Homepage (link) Your plugin registration class also inherit from `Core\Base`, that means you can access to all classes and methods of Kanboard easily. -- cgit v1.2.3
    e($plugin->getPluginName()) ?>e($plugin->getPluginAuthor()) ?>e($plugin->getPluginVersion()) ?>e($plugin->getPluginDescription()) ?>
    e($plugin->getPluginName()) ?> + getPluginHomepage()): ?> + e($plugin->getPluginName()) ?> + + e($plugin->getPluginName()) ?> + + e($plugin->getPluginAuthor()) ?> e($plugin->getPluginVersion()) ?> e($plugin->getPluginDescription()) ?>