Table of Contents
This functionality allows you to link a task to additional items stored on another system.
For example, you can link a task to:
Each item has a type, a URL, a dependency type and a title.
By default, Kanboard includes two kinds of providers:
ExternalLinkInterface
To implement a new link provider from a plugin, you need to create 2 classes that implement those interfaces:
Kanboard\Core\ExternalLink\ExternalLinkProviderInterface
Kanboard\Core\ExternalLink\ExternalLinkInterface
Method | Usage |
---|---|
getName() | Get provider name (label) |
getType() | Get link type (will be saved in the database) |
getDependencies() | Get a dictionary of supported dependency types by the provider |
setUserTextInput($input) | Set text entered by the user |
match() | Return true if the provider can parse correctly the user input |
getLink() | Get the link found with the properties |
Method | Usage |
---|---|
getTitle() | Get link title |
getUrl() | Get link URL |
setUrl($url) | Set link URL |
In your Plugin.php
, just call the method register()
from the object ExternalLinkManager
:
<?php
namespace Kanboard\Plugin\MyExternalLink;
use Kanboard\Core\Plugin\Base;
class Plugin extends Base
{
public function initialize()
{
$this->externalLinkManager->register(new MyLinkProvider($this->container));
}
}