2015-08-03 04:39:42 -04:00
|
|
|
<?php
|
2026-03-26 12:46:27 -04:00
|
|
|
|
|
|
|
|
// SPDX-FileCopyrightText: 2018 Icinga GmbH <https://icinga.com>
|
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
2015-08-03 04:39:42 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 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
|
2022-05-13 09:23:16 -04:00
|
|
|
* @see \Icinga\Application\Hook\TicketHook::createLinks()
|
2015-08-03 04:39:42 -04:00
|
|
|
*/
|
|
|
|
|
public function createTicketLinks($text)
|
|
|
|
|
{
|
|
|
|
|
$tickets = $this->view->tickets;
|
2023-08-15 09:37:08 -04:00
|
|
|
/** @var \Icinga\Application\Hook\TicketHook|array|null $tickets */
|
|
|
|
|
return ! empty($tickets) ? $tickets->createLinks($text) : $text;
|
2015-08-03 04:39:42 -04:00
|
|
|
}
|
|
|
|
|
}
|