| @@ 262-291 (lines=30) @@ | ||
| 259 | return $factory->build(); |
|
| 260 | }); |
|
| 261 | ||
| 262 | $builder->create('orders', SubMenu::class, function(SubMenuFactory $factory) { |
|
| 263 | $factory->attributes->push(['class' => 'child-menu']); |
|
| 264 | $factory->title = 'Orders'; |
|
| 265 | $factory->url = 'javascript:;'; |
|
| 266 | ||
| 267 | $factory->builder->create('all', Link::class, function(LinkFactory $factory) { |
|
| 268 | $factory->title = 'All'; |
|
| 269 | $factory->url = url('/orders/all'); |
|
| 270 | ||
| 271 | return $factory->build(); |
|
| 272 | }); |
|
| 273 | ||
| 274 | $factory->builder->create('type_1', Link::class, function(LinkFactory $factory) { |
|
| 275 | $factory->title = 'Type 1'; |
|
| 276 | $factory->url = url('/orders/1'); |
|
| 277 | $factory->linkAttributes->push(['class' => 'text-color-red']); |
|
| 278 | ||
| 279 | return $factory->build(); |
|
| 280 | }); |
|
| 281 | ||
| 282 | $factory->builder->create('type_2', Link::class, function(LinkFactory $factory) { |
|
| 283 | $factory->title = 'Type 2'; |
|
| 284 | $factory->url = url('/orders/2'); |
|
| 285 | $factory->linkAttributes->push(['data-attribute' => 'value']); |
|
| 286 | ||
| 287 | return $factory->build(); |
|
| 288 | }); |
|
| 289 | ||
| 290 | return $factory->build(); |
|
| 291 | }); |
|
| 292 | ||
| 293 | $html = $builder->render(); |
|
| 294 | ||
| @@ 32-61 (lines=30) @@ | ||
| 29 | return $factory->build(); |
|
| 30 | }); |
|
| 31 | ||
| 32 | $builder->create('orders', SubMenu::class, function(SubMenuFactory $factory) { |
|
| 33 | $factory->attributes->push(['class' => 'child-menu']); |
|
| 34 | $factory->title = 'Orders'; |
|
| 35 | $factory->url = 'javascript:;'; |
|
| 36 | ||
| 37 | $factory->builder->create('all', Link::class, function(LinkFactory $factory) { |
|
| 38 | $factory->title = 'All'; |
|
| 39 | $factory->url = url('/orders/all'); |
|
| 40 | ||
| 41 | return $factory->build(); |
|
| 42 | }); |
|
| 43 | ||
| 44 | $factory->builder->create('type_1', Link::class, function(LinkFactory $factory) { |
|
| 45 | $factory->title = 'Type 1'; |
|
| 46 | $factory->url = url('/orders/1'); |
|
| 47 | $factory->linkAttributes->push(['class' => 'text-color-red']); |
|
| 48 | ||
| 49 | return $factory->build(); |
|
| 50 | }); |
|
| 51 | ||
| 52 | $factory->builder->create('type_2', Link::class, function(LinkFactory $factory) { |
|
| 53 | $factory->title = 'Type 2'; |
|
| 54 | $factory->url = url('/orders/2'); |
|
| 55 | $factory->linkAttributes->push(['data-attribute' => 'value']); |
|
| 56 | ||
| 57 | return $factory->build(); |
|
| 58 | }); |
|
| 59 | ||
| 60 | return $factory->build(); |
|
| 61 | }); |
|
| 62 | ||
| 63 | return $builder; |
|
| 64 | } |
|