StartController::indexActionGet()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 26
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 14
nc 1
nop 0
dl 0
loc 26
c 0
b 0
f 0
cc 1
rs 9.7998
1
<?php
2
3
namespace KW\Inlagg;
4
5
use Anax\Commons\ContainerInjectableInterface;
6
use Anax\Commons\ContainerInjectableTrait;
7
8
class StartController implements ContainerInjectableInterface
9
{
10
    use ContainerInjectableTrait;
11
12
    public function indexActionGet()
13
    {
14
        $fragehamtaren = new Fragehamtaren($this->di);
15
        $res  = $fragehamtaren->hamtaSenasteInlagg();
16
        $res2 = $fragehamtaren->popularasteTaggar();
17
        $res3 = $fragehamtaren->aktivasteAnvandare();
18
19
        $page = $this->di->get("page");
20
21
        $page->add("anax/v2/side-bars/senaste-fragor", [
22
            "res" => $res,
23
            ]);
24
25
        $page->add("anax/v2/start/start", [
26
            ]);
27
28
        $page->add("anax/v2/side-bars/aktivaste-anvandare", [
29
            "res3" => $res3,
30
            ]);
31
32
        $page->add("anax/v2/side-bars/popularaste-taggar", [
33
            "res2" => $res2,
34
            ]);
35
36
        return $page->render([
37
            "title"=>"Hem"
38
        ]);
39
    }
40
}
41