Completed
Pull Request — master (#19)
by Alberto
03:45
created

TwigView   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 4
c 2
b 0
f 0
dl 0
loc 11
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A initializeExtensions() 0 6 1
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * BEdita, API-first content management framework
6
 * Copyright 2018 ChannelWeb Srl, Chialab Srl
7
 *
8
 * This file is part of BEdita: you can redistribute it and/or modify
9
 * it under the terms of the GNU Lesser General Public License as published
10
 * by the Free Software Foundation, either version 3 of the License, or
11
 * (at your option) any later version.
12
 *
13
 * See LICENSE.LGPL or <http://gnu.org/licenses/lgpl-3.0.html> for more details.
14
 */
15
namespace BEdita\WebTools\View;
16
17
use BEdita\WebTools\View\Twig\BeditaTwigExtension;
18
use Cake\TwigView\View\TwigView as BaseTwigView;
19
20
/**
21
 * View class that uses TwigView and adds Twig extensions
22
 */
23
class TwigView extends BaseTwigView
24
{
25
    /**
26
     * {@inheritDoc}
27
     */
28
    public function initializeExtensions(): void
29
    {
30
        parent::initializeExtensions();
31
32
        $this->getTwig()
33
            ->addExtension(new BeditaTwigExtension());
34
    }
35
}
36