summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Core/Plugin/Base.php13
-rw-r--r--app/Template/config/plugins.php8
-rw-r--r--doc/plugins.markdown9
3 files changed, 25 insertions, 5 deletions
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 @@
<?php foreach($plugins as $plugin): ?>
<tr>
- <td><?= $this->e($plugin->getPluginName()) ?></td>
+ <td>
+ <?php if ($plugin->getPluginHomepage()): ?>
+ <a href="<?= $plugin->getPluginHomepage() ?>" target="_blank" rel="noreferrer"><?= $this->e($plugin->getPluginName()) ?></a>
+ <?php else: ?>
+ <?= $this->e($plugin->getPluginName()) ?>
+ <?php endif ?>
+ </td>
<td><?= $this->e($plugin->getPluginAuthor()) ?></td>
<td><?= $this->e($plugin->getPluginVersion()) ?></td>
<td><?= $this->e($plugin->getPluginDescription()) ?></td>
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.