Completed
Push — dev ( 55082e...9b9214 )
by Stone
14s
created

Home   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A index() 0 8 1
A __construct() 0 4 1
1
<?php
2
3
namespace App\Controllers;
4
5
use App\Models\ConfigModel;
6
use App\Models\IncludesModel;
7
use Core\Container;
8
9
/**
10
 * Class Home
11
 *
12
 * The home page
13
 *
14
 * @package App\Controllers
15
 */
16
class Home extends \Core\Controller
17
{
18
19
    protected $siteConfig;
20
21
    public function __construct(Container $container)
22
    {
23
        $this->loadModules[] = 'SiteConfig';
24
        parent::__construct($container);
25
    }
26
27
    public function index()
28
    {
29
30
        $this->data['configs'] = $this->siteConfig->getSiteConfig();
31
        $Includes = new IncludesModel($this->container);
32
        $this->data['navigation'] = $Includes->getMenu();
33
        $this->data['jumbotron'] = true;
34
        $this->renderView('Home');
35
    }
36
}