summaryrefslogtreecommitdiffstats
path: root/application/views/helpers/CreateTicketLinks.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/views/helpers/CreateTicketLinks.php')
-rw-r--r--application/views/helpers/CreateTicketLinks.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/application/views/helpers/CreateTicketLinks.php b/application/views/helpers/CreateTicketLinks.php
new file mode 100644
index 0000000..4f8a272
--- /dev/null
+++ b/application/views/helpers/CreateTicketLinks.php
@@ -0,0 +1,23 @@
+<?php
+/* Icinga Web 2 | (c) 2015 Icinga Development Team | GPLv2+ */
+
+/**
+ * Helper for creating ticket links from ticket hooks
+ */
+class Zend_View_Helper_CreateTicketLinks extends Zend_View_Helper_Abstract
+{
+ /**
+ * Create ticket links form ticket hooks
+ *
+ * @param string $text
+ *
+ * @return string
+ * @see \Icinga\Application\Hook\TicketHook::createLinks()
+ */
+ public function createTicketLinks($text)
+ {
+ $tickets = $this->view->tickets;
+ /** @var \Icinga\Application\Hook\TicketHook $tickets */
+ return isset($tickets) ? $tickets->createLinks($text) : $text;
+ }
+}