diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml index b3cdf30..c9409a4 100644 --- a/config/packages/twig.yaml +++ b/config/packages/twig.yaml @@ -1,2 +1,4 @@ twig: default_path: '%kernel.project_dir%/templates' + globals: + menu_items: '@App\Repository\MenuItemRepository' diff --git a/src/Repository/MenuItemArrayRepository.php b/src/Repository/MenuItemArrayRepository.php new file mode 100644 index 0000000..a0f0647 --- /dev/null +++ b/src/Repository/MenuItemArrayRepository.php @@ -0,0 +1,34 @@ + 'Conference', + 'is_active' => false, + ], + [ + 'title' => 'Sponsors', + 'is_active' => false, + ], + [ + 'title' => 'Community', + 'is_active' => false, + ], + [ + 'title' => 'FAQ', + 'is_active' => false, + ], + [ + 'title' => 'Register', + 'is_active' => true, + ], + ]; + } +} diff --git a/src/Repository/MenuItemRepository.php b/src/Repository/MenuItemRepository.php new file mode 100644 index 0000000..830e464 --- /dev/null +++ b/src/Repository/MenuItemRepository.php @@ -0,0 +1,8 @@ +