@@ 144-151 (lines=8) @@ | ||
141 | $link->setTitle('Orders'); |
|
142 | $link->setUrl('javascript:;'); |
|
143 | ||
144 | }, function(Builder $menu) { |
|
145 | $menu->add('all', 'All', url('/orders/all')); |
|
146 | $menu->add('type_1', 'Type 1', url('/orders/1'), [], ['class' => 'text-color-red']); |
|
147 | ||
148 | $menu->add('type_2', 'Type 2', url('/orders/2'), [], [], function(Item $item) { |
|
149 | $item->getLink()->getAttributes()->push(['data-attribute' => 'value']); |
|
150 | }); |
|
151 | }); |
|
152 | ||
153 | $html = $builder->render(); |
|
154 | $file = file_get_contents(__DIR__ . '/stub/menu.html'); |
@@ 31-38 (lines=8) @@ | ||
28 | $link = $item->getLink(); |
|
29 | $link->setTitle('Orders'); |
|
30 | $link->setUrl('javascript:;'); |
|
31 | }, function(Builder $menu) { |
|
32 | $menu->add('all', 'All', url('/orders/all')); |
|
33 | $menu->add('type_1', 'Type 1', url('/orders/1'), [], ['class' => 'text-color-red']); |
|
34 | ||
35 | $menu->add('type_2', 'Type 2', url('/orders/2'), [], [], function(Item $item) { |
|
36 | $item->getLink()->getAttributes()->push(['data-attribute' => 'value']); |
|
37 | }); |
|
38 | }); |
|
39 | ||
40 | return $builder; |
|
41 | } |