1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file was created by developers working at BitBag |
5
|
|
|
* Do you need more information about us and what we do? Visit our https://bitbag.io website! |
6
|
|
|
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career |
7
|
|
|
*/ |
8
|
|
|
|
9
|
|
|
declare(strict_types=1); |
10
|
|
|
|
11
|
|
|
namespace BitBag\SyliusCmsPlugin\Menu; |
12
|
|
|
|
13
|
|
|
use Sylius\Bundle\UiBundle\Menu\Event\MenuBuilderEvent; |
14
|
|
|
|
15
|
|
|
final class ContentManagementMenuBuilder |
16
|
|
|
{ |
17
|
|
|
public function buildMenu(MenuBuilderEvent $menuBuilderEvent): void |
18
|
|
|
{ |
19
|
|
|
$menu = $menuBuilderEvent->getMenu(); |
20
|
|
|
|
21
|
|
|
$cmsRootMenuItem = $menu |
22
|
|
|
->addChild('bitbag_cms') |
23
|
|
|
->setLabel('bitbag_sylius_cms_plugin.ui.cms') |
24
|
|
|
; |
25
|
|
|
|
26
|
|
|
$cmsRootMenuItem |
27
|
|
|
->addChild('blocks', [ |
28
|
|
|
'route' => 'bitbag_sylius_cms_plugin_admin_block_index', |
29
|
|
|
]) |
30
|
|
|
->setLabel('bitbag_sylius_cms_plugin.ui.blocks') |
31
|
|
|
->setLabelAttribute('icon', 'block layout') |
32
|
|
|
; |
33
|
|
|
|
34
|
|
|
$cmsRootMenuItem |
35
|
|
|
->addChild('media', [ |
36
|
|
|
'route' => 'bitbag_sylius_cms_plugin_admin_media_index', |
37
|
|
|
]) |
38
|
|
|
->setLabel('bitbag_sylius_cms_plugin.ui.media') |
39
|
|
|
->setLabelAttribute('icon', 'file') |
40
|
|
|
; |
41
|
|
|
|
42
|
|
|
$cmsRootMenuItem |
43
|
|
|
->addChild('pages', [ |
44
|
|
|
'route' => 'bitbag_sylius_cms_plugin_admin_page_index', |
45
|
|
|
]) |
46
|
|
|
->setLabel('bitbag_sylius_cms_plugin.ui.pages') |
47
|
|
|
->setLabelAttribute('icon', 'sticky note') |
48
|
|
|
; |
49
|
|
|
|
50
|
|
|
$cmsRootMenuItem |
51
|
|
|
->addChild('faq', [ |
52
|
|
|
'route' => 'bitbag_sylius_cms_plugin_admin_frequently_asked_question_index', |
53
|
|
|
]) |
54
|
|
|
->setLabel('bitbag_sylius_cms_plugin.ui.faq') |
55
|
|
|
->setLabelAttribute('icon', 'help') |
56
|
|
|
; |
57
|
|
|
|
58
|
|
|
$cmsRootMenuItem |
59
|
|
|
->addChild('sections', [ |
60
|
|
|
'route' => 'bitbag_sylius_cms_plugin_admin_section_index', |
61
|
|
|
]) |
62
|
|
|
->setLabel('bitbag_sylius_cms_plugin.ui.sections') |
63
|
|
|
->setLabelAttribute('icon', 'grid layout') |
64
|
|
|
; |
65
|
|
|
} |
66
|
|
|
} |
67
|
|
|
|