Added local file link provider

This commit is contained in:
Frederic Guillot
2016-03-17 21:52:40 -04:00
parent 18d203225b
commit e3e08d0e34
6 changed files with 174 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace Kanboard\ExternalLink;
use Kanboard\Core\ExternalLink\ExternalLinkInterface;
/**
* File Link
*
* @package externalLink
* @author Frederic Guillot
*/
class FileLink extends BaseLink implements ExternalLinkInterface
{
/**
* Get link title
*
* @access public
* @return string
*/
public function getTitle()
{
$path = parse_url($this->url, PHP_URL_PATH);
return basename(str_replace('\\', '/', $path));
}
}