Completed
Pull Request — master (#4522)
by Craig
13:45
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
20
class HookExtension extends AbstractExtension
21
{
22
    public function getFunctions()
23
    {
24
        return [
25
            new TwigFunction('notifyDisplayHooks', [$this, 'notifyDisplayHooks'], ['is_safe' => ['html']]),
26
            new TwigFunction('routeUrl', [$this, 'createRouteUrl'])
27
        ];
28
    }
29
30
    public function getFilters()
31
    {
32
        return [
33
            new TwigFilter('notifyFilters', [$this, 'notifyFilters'], ['is_safe' => ['html']])
34
        ];
35
    }
36
}
37