Completed
Push — master ( d21dd2...a23d9a )
by Beñat
8s
created

AppTheme::context()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
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 AppTheme;
13
14
use LIN3S\WPFoundation\Configuration\Mailer\Mailer;
15
use LIN3S\WPFoundation\Configuration\Theme\Theme;
16
use LIN3S\WPFoundation\Twig\TranslationTwig;
17
use AppTheme\Configuration\Assets;
18
use AppTheme\Configuration\Login;
19
use AppTheme\Configuration\Menus;
20
use Timber\Menu;
21
22
/**
23
 * Final class of theme. Declares all stuff related to the template. Its responsibility
24
 * is just to centralise all customization. If you need to add some customization create a class and
25
 * call its constructor here. For more info about how this theme is structured read README.md
26
 * located in the theme root.
27
 *
28
 * @author Gorka Laucirica <[email protected]>
29
 * @author Beñat Espiña <[email protected]>
30
 */
31
final class AppTheme extends Theme
32
{
33
    /**
34
     * {@inheritdoc}
35
     */
36
    public function classes()
37
    {
38
        new Assets();
39
        new Login();
40
        new Mailer();
41
        new Menus();
42
43
        new TranslationTwig();
44
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49
    public function context(array $context)
50
    {
51
        $context['headerMenu'] = new Menu(Menus::MENU_HEADER);
52
53
        return $context;
54
    }
55
56
    /**
57
     * {@inheritdoc}
58
     */
59
    public function templates($templates)
60
    {
61
        return $templates;
62
    }
63
}
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...
64