Added local file link provider
This commit is contained in:
26
app/ExternalLink/FileLink.php
Normal file
26
app/ExternalLink/FileLink.php
Normal 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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user