summaryrefslogtreecommitdiff
path: root/app/ExternalLink/AttachmentLink.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/ExternalLink/AttachmentLink.php')
-rw-r--r--app/ExternalLink/AttachmentLink.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/app/ExternalLink/AttachmentLink.php b/app/ExternalLink/AttachmentLink.php
new file mode 100644
index 00000000..5a0d1344
--- /dev/null
+++ b/app/ExternalLink/AttachmentLink.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Kanboard\ExternalLink;
+
+use Kanboard\Core\ExternalLink\ExternalLinkInterface;
+
+/**
+ * Attachment Link
+ *
+ * @package externalLink
+ * @author Frederic Guillot
+ */
+class AttachmentLink extends BaseLink implements ExternalLinkInterface
+{
+ /**
+ * Get link title
+ *
+ * @access public
+ * @return string
+ */
+ public function getTitle()
+ {
+ $path = parse_url($this->url, PHP_URL_PATH);
+ return basename($path);
+ }
+}