BrandingExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getFunctions() 0 8 1
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\ThemeBundle\Twig\Extension;
15
16
use Twig\Extension\AbstractExtension;
17
use Twig\TwigFunction;
18
use Zikula\ThemeBundle\Twig\Runtime\BrandingRuntime;
19
20
class BrandingExtension extends AbstractExtension
21
{
22
    public function getFunctions()
23
    {
24
        return [
25
            new TwigFunction('siteDefinition', [BrandingRuntime::class, 'getSiteDefinition']),
26
            new TwigFunction('siteName', [BrandingRuntime::class, 'getSiteName']),
27
            new TwigFunction('siteSlogan', [BrandingRuntime::class, 'getSiteSlogan']),
28
            new TwigFunction('siteBranding', [BrandingRuntime::class, 'getSiteBrandingMarkup'], ['is_safe' => ['html']]),
29
            new TwigFunction('siteImagePath', [BrandingRuntime::class, 'getSiteImagePath'])
30
        ];
31
    }
32
}
33