ACPDashboardController::indexAction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 3
Metric Value
c 3
b 0
f 3
dl 0
loc 9
rs 9.6666
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the 2martens Web Platform.
5
 *
6
 * (c) Jim Martens <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace TwoMartens\Bundle\CoreBundle\Controller;
13
14
use Symfony\Component\HttpFoundation\Response;
15
16
/**
17
 * Manages the routes for the ACP dashboard.
18
 *
19
 * @author Jim Martens <[email protected]>
20
 */
21
class ACPDashboardController extends AbstractACPController
22
{
23
    /**
24
     * Shows the dashboard/landing site of the ACP.
25
     *
26
     * @return Response
27
     */
28
    public function indexAction()
29
    {
30
        $this->assignVariables();
31
32
        return $this->render(
33
            'TwoMartensCoreBundle:ACPDashboard:index.html.twig',
34
            $this->templateVariables
35
        );
36
    }
37
38
    /**
39
     * {@inheritdoc}
40
     */
41
    protected function setBreadcrumbs()
42
    {
43
        // no breadcrumbs needed on ACP Dashboard
44
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49 View Code Duplication
    protected function assignVariables()
50
    {
51
        $this->templateVariables = array(
52
            'area' => array(
53
                'showBreadcrumbs' => false,
54
                'title' => $this->get('translator')->trans('acp.dashboard', array(), 'TwoMartensCoreBundle')
55
            ),
56
            'siteTitle' => $this->get('translator')->trans(
57
                'acp.siteTitle',
58
                array('globalTitle' => 'CoreBundle Test'),
59
                'TwoMartensCoreBundle'
60
            ),
61
            'navigation' => array(
62
                'active' => 'home'
63
            ),
64
        );
65
        parent::assignVariables();
66
    }
67
}
68