Passed
Push — master ( 20e747...679572 )
by Ivan
01:59
created

RouteNavigationItem::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
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Everlution\Navigation;
6
7
use Everlution\Navigation\Extension\ManualMatch;
8
use Everlution\Navigation\Extension\ManualMatchExtension;
9
10
/**
11
 * Class RouteNavigationItem.
12
 * @author Ivan Barlog <[email protected]>
13
 */
14
class RouteNavigationItem extends NavigationItem implements RoutableItem, ManualMatch
15
{
16
    use ManualMatchExtension;
17
18
    /** @var array */
19
    private $parameters;
20
21
    public function __construct(
22
        string $label,
23
        string $route,
24
        array $parameters = [],
25
        Item $parent = null,
26
        array $children = []
27
    ) {
28
        parent::__construct($route, $label, $parent, $children);
29
30
        $this->parameters = $parameters;
31
    }
32
33
    public function getRoute(): string
34
    {
35
        return $this->getUri();
36
    }
37
38
    public function getParameters(): array
39
    {
40
        return $this->parameters;
41
    }
42
}
43