summaryrefslogtreecommitdiffstats
path: root/application/views/helpers/CreateTicketLinks.php
blob: 4f8a27249884aa5af49a9b5ccce9a5d20e867fc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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;
    }
}