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

ThemeExtension::getPreviewImagePath()   A

Complexity

Conditions 4
Paths 5

Size

Total Lines 17
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
eloc 9
nc 5
nop 2
dl 0
loc 17
rs 9.9666
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\ThemeModule\Twig\Extension;
15
16
use Twig\Extension\AbstractExtension;
17
use Twig\TwigFunction;
18
use Zikula\ThemeModule\Twig\Runtime\ThemeRuntime;
19
20
class ThemeExtension extends AbstractExtension
21
{
22
    public function getFunctions()
23
    {
24
        return [
25
            new TwigFunction('pageAddAsset', [ThemeRuntime::class, 'pageAddAsset']),
26
            new TwigFunction('getPreviewImagePath', [ThemeRuntime::class, 'getPreviewImagePath'], ['is_safe' => ['html']]),
27
            new TwigFunction('zasset', [ThemeRuntime::class, 'getAssetPath'])
28
        ];
29
    }
30
}
31