HomeController::__callNumber()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Controller\Panel;
4
5
use App\Entity\Forum;
6
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
7
8
class HomeController extends AbstractController
9
{
10
    public static function __setupNavigation()
11
    {
12
        return [
13
            'type' => 'link',
14
            'parent' => 'root',
15
            'id' => 'home',
16
            'title' => 'Dashboard',
17
            'href' => 'home',
18
            'icon' => 'hs-admin-panel',
19
            'view' => 'HomeController::home',
20
        ];
21
    }
22
23
    public static function __callNumber()
24
    {
25
        return 1;
26
    }
27
28
    public function home($navigation, Forum $forum)
29
    {
30
        return $this->render(
31
            'theme_admin1/home.html.twig',
32
            [
33
                'navigation_links' => $navigation,
34
                'current_forum' => $forum,
35
            ]
36
        );
37
    }
38
}
39