Add getPluginHomepage()
This commit is contained in:
@@ -96,4 +96,17 @@ abstract class Base extends \Core\Base
|
|||||||
{
|
{
|
||||||
return '?';
|
return '?';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get plugin homepage
|
||||||
|
*
|
||||||
|
* This method should be overrided by your Plugin class
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getPluginHomepage()
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,13 @@
|
|||||||
|
|
||||||
<?php foreach($plugins as $plugin): ?>
|
<?php foreach($plugins as $plugin): ?>
|
||||||
<tr>
|
<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->getPluginAuthor()) ?></td>
|
||||||
<td><?= $this->e($plugin->getPluginVersion()) ?></td>
|
<td><?= $this->e($plugin->getPluginVersion()) ?></td>
|
||||||
<td><?= $this->e($plugin->getPluginDescription()) ?></td>
|
<td><?= $this->e($plugin->getPluginDescription()) ?></td>
|
||||||
|
|||||||
@@ -70,10 +70,11 @@ Available methods from `Core\Plugin\Base`:
|
|||||||
- `initialize()`: Executed when the plugin is loaded
|
- `initialize()`: Executed when the plugin is loaded
|
||||||
- `getClasses()`: Return all classes that should be stored in the dependency injection container
|
- `getClasses()`: Return all classes that should be stored in the dependency injection container
|
||||||
- `on($event, $callback)`: Listen on internal events
|
- `on($event, $callback)`: Listen on internal events
|
||||||
- `getPluginName()`: Get plugin name
|
- `getPluginName()`: Should return plugin name
|
||||||
- `getPluginAuthor()`: Get plugin author
|
- `getPluginAuthor()`: Should return plugin author
|
||||||
- `getPluginVersion()`: Get plugin version
|
- `getPluginVersion()`: Should return plugin version
|
||||||
- `getPluginDescription()`: Get plugin description
|
- `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.
|
Your plugin registration class also inherit from `Core\Base`, that means you can access to all classes and methods of Kanboard easily.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user