Test Setup Failed
Pull Request — master (#4522)
by Craig
08:26 queued 03:47
created

HookExtension::notifyDisplayHooks()   B

Complexity

Conditions 7
Paths 6

Size

Total Lines 27
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 7
eloc 15
nc 6
nop 4
dl 0
loc 27
rs 8.8333
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Zikula package.
7
 *
8
 * Copyright Zikula - https://ziku.la/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Zikula\Bundle\HookBundle\Twig\Extension;
15
16
use Twig\Extension\AbstractExtension;
17
use Twig\TwigFilter;
18
use Twig\TwigFunction;
19
use Zikula\Bundle\HookBundle\Twig\Runtime\HookRuntime;
20
21
class HookExtension extends AbstractExtension
22
{
23
    public function getFunctions()
24
    {
25
        return [
26
            new TwigFunction('notifyDisplayHooks', [HookRuntime::class, 'notifyDisplayHooks'], ['is_safe' => ['html']]),
27
            new TwigFunction('routeUrl', [HookRuntime::class, 'createRouteUrl'])
28
        ];
29
    }
30
31
    public function getFilters()
32
    {
33
        return [
34
            new TwigFilter('notifyFilters', [HookRuntime::class, 'notifyFilters'], ['is_safe' => ['html']])
35
        ];
36
    }
37
}
38