-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathTicketGlobalExtension.php
45 lines (38 loc) · 1.18 KB
/
TicketGlobalExtension.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
declare(strict_types=1);
/*
* This file is part of HackzillaTicketBundle package.
*
* (c) Daniel Platt <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Hackzilla\Bundle\TicketBundle\TwigExtension;
use Twig\Extension\AbstractExtension;
use Twig\Extension\GlobalsInterface;
final class TicketGlobalExtension extends AbstractExtension implements GlobalsInterface
{
public function __construct(protected array $templates)
{
}
public function getGlobals(): array
{
return [
'hackzilla_ticket' => [
'templates' => [
'index' => $this->templates['index'],
'new' => $this->templates['new'],
'show' => $this->templates['show'],
'show_attachment' => $this->templates['show_attachment'],
'prototype' => $this->templates['prototype'],
'macros' => $this->templates['macros'],
],
],
];
}
public function getName(): string
{
return 'ticketGlobal';
}
}