forked from kevinpapst/AdminLTEBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKnpMenuEvent.php
82 lines (73 loc) · 1.53 KB
/
KnpMenuEvent.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
/*
* This file is part of the AdminLTE bundle.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace KevinPapst\AdminLTEBundle\Event;
use Knp\Menu\FactoryInterface;
use Knp\Menu\ItemInterface;
/**
* Collect all MenuItemInterface objects that should be rendered in the menu/navigation section.
*/
class KnpMenuEvent extends ThemeEvent
{
/**
* @var ItemInterface
*/
protected $menu;
/**
* @var FactoryInterface
*/
protected $factory;
/**
* @var array
*/
private $options;
/**
* @var array
*/
private $childOptions;
/**
* @param ItemInterface $menu
* @param FactoryInterface $factory
* @param array $options
* @param array $childOptions
*/
public function __construct($menu, $factory, $options = [], $childOptions = [])
{
$this->menu = $menu;
$this->factory = $factory;
$this->options = $options;
$this->childOptions = $childOptions;
}
/**
* @return ItemInterface
*/
public function getMenu()
{
return $this->menu;
}
/**
* @return FactoryInterface
*/
public function getFactory()
{
return $this->factory;
}
/**
* @return array
*/
public function getOptions()
{
return $this->options;
}
/**
* @return array
*/
public function getChildOptions()
{
return $this->childOptions;
}
}