Completed
Pull Request — master (#244)
by Łukasz
09:35
created

RoutableItem::getRoute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/**
4
 * (c) FSi sp. z o.o. <[email protected]>
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace FSi\Bundle\AdminBundle\Menu\Item;
11
12
class RoutableItem extends Item
13
{
14
    /**
15
     * @var string
16
     */
17
    private $route;
18
19
    /**
20
     * @var array
21
     */
22
    private $routeParameters;
23
24
    /**
25
     * @param string $name
26
     * @param $route
27
     * @param $routeParameters
28
     */
29
    public function __construct($name, $route = null, $routeParameters = array())
30
    {
31
        parent::__construct($name);
32
33
        $this->route = $route;
34
        $this->routeParameters = $routeParameters;
35
    }
36
37
    /**
38
     * @return string
39
     */
40
    public function getRoute()
41
    {
42
        return $this->route;
43
    }
44
45
    /**
46
     * @return array
47
     */
48
    public function getRouteParameters()
49
    {
50
        return $this->routeParameters;
51
    }
52
}
53