Completed
Push — master ( 15801b...8d663b )
by
unknown
10:34
created

WordpressStandardTheme::templates()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the WordPress Standard project.
5
 *
6
 * Copyright (c) 2015-2016 LIN3S <[email protected]>
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
namespace WordpressStandard;
13
14
use LIN3S\WPFoundation\Configuration\Mailer\Mailer;
15
use LIN3S\WPFoundation\Twig\TagManagerTwig;
16
use LIN3S\WPFoundation\Twig\TranslationTwig;
17
use WordpressStandard\Configuration\Assets;
18
use WordpressStandard\Configuration\ImageSizes;
19
use WordpressStandard\Configuration\Menus;
20
use LIN3S\WPFoundation\Configuration\Theme\Theme;
21
use Timber\Menu;
22
23
/**
24
 * Final class of theme. Declares all stuff related to the template. Its responsibility
25
 * is just to centralise all customization. If you need to add some customization create a class and
26
 * call its constructor here. For more info about how this theme is structured read README.md
27
 * located in the theme root.
28
 *
29
 * @author Gorka Laucirica <[email protected]>
30
 * @author Beñat Espiña <[email protected]>
31
 */
32
final class WordpressStandardTheme extends Theme
33
{
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function classes()
38
    {
39
        new Assets();
40
        new ImageSizes();
41
        new Mailer();
42
        new Menus();
43
44
        new TagManagerTwig();
45
        new TranslationTwig();
46
    }
47
48
    /**
49
     * {@inheritdoc}
50
     */
51
    public function context(array $context)
52
    {
53
        $context['headerMenu'] = new Menu(Menus::MENU_HEADER);
54
55
        return $context;
56
    }
57
58
    /**
59
     * {@inheritdoc}
60
     */
61
    public function templates($templates)
62
    {
63
        return $templates;
64
    }
65
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
66