AbstractController::initialize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 7
c 0
b 0
f 0
dl 0
loc 11
ccs 0
cts 8
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
/**
4
 * This file is part of the Zemit Framework.
5
 *
6
 * (c) Zemit Team <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE.txt
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Zemit\Modules\Frontend\Controllers;
13
14
use Zemit\Modules\Frontend\Controller;
15
use Zemit\Tag;
16
17
abstract class AbstractController extends Controller
18
{
19
    public function initialize()
20
    {
21
        Tag::setAttr('html', ['lang' => $this->dispatcher->getParam('language', 'string', 'en')]);
22
        Tag::setTitle($this->config->path('core.name', 'Zemit Frontend'));
23
        
24
        $this->assets->collection('head')
25
            ->addCss('/head.css', true, true, [], null, true)
26
            ->addJs('/head.js', true, true, [], null, true);
27
28
        $this->assets->collection('footer')
29
            ->addJs('/footer.js', true, true, [], null, true);
30
    }
31
}
32