1 | <?php |
||
9 | class MenuExtension extends \Twig_Extension |
||
10 | { |
||
11 | |||
12 | /** |
||
13 | * @var Helper |
||
14 | */ |
||
15 | protected $menuHelper; |
||
16 | |||
17 | /** |
||
18 | * @var MatcherInterface |
||
19 | */ |
||
20 | protected $matcher; |
||
21 | |||
22 | /** |
||
23 | * @param Helper $menuHelper |
||
24 | * @param MatcherInterface $matcher |
||
25 | */ |
||
26 | public function __construct(Helper $menuHelper, MatcherInterface $matcher) |
||
31 | |||
32 | /** |
||
33 | * {@inheritDoc} |
||
34 | */ |
||
35 | public function getFunctions() |
||
41 | |||
42 | /** |
||
43 | * @param ItemInterface|string $menu |
||
44 | * @param array $path |
||
45 | * @param array $options |
||
46 | * |
||
47 | * @return ItemInterface[] |
||
48 | * |
||
49 | * @throws \BadMethodCallException when there is no menu provider and the menu is given by name |
||
50 | * @throws \LogicException |
||
51 | * @throws \InvalidArgumentException when the path is invalid |
||
52 | */ |
||
53 | public function getCurrents($menu, array $path = array(), array $options = array()) |
||
72 | |||
73 | /** |
||
74 | * {@inheritdoc} |
||
75 | */ |
||
76 | public function getName() |
||
80 | } |
||
81 |