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

Home::index()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 8
rs 10
c 0
b 0
f 0
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
}