Completed
Push — master ( 155c91...41d5fe )
by Axel
05:02
created

TwigExtension::setAdditionalDependencies()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 3
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the Zikula package.
5
 *
6
 * Copyright Zikula - https://ziku.la/
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Zikula\RoutesModule\Twig;
15
16
use Twig\TwigFilter;
17
use Zikula\RoutesModule\Twig\Base\AbstractTwigExtension;
18
19
/**
20
 * Twig extension implementation class.
21
 */
22
class TwigExtension extends AbstractTwigExtension
23
{
24
    public function getFunctions()
25
    {
26
        return [];
27
    }
28
29
    public function getFilters()
30
    {
31
        return [
32
            new TwigFilter('zikularoutesmodule_listEntry', [TwigRuntime::class, 'getListEntry']), // from base class
33
            new TwigFilter('zikularoutesmodule_formattedTitle', [TwigRuntime::class, 'getFormattedEntityTitle']), // from base class
34
            new TwigFilter('zikularoutesmodule_arrayToString', [TwigRuntime::class, 'displayArrayAsString'], ['is_safe' => ['html']]),
35
            new TwigFilter('zikularoutesmodule_pathToString', [TwigRuntime::class, 'displayPathAsString'], ['is_safe' => ['html']])
36
        ];
37
    }
38
}
39