Add MonsieurBiz Sylius Homepage Plugin recipe (#1294)

This commit is contained in:
Maxime Huran
2022-02-19 12:07:04 +01:00
committed by GitHub
parent 4cc1a08a01
commit 79746a1987
3 changed files with 30 additions and 0 deletions
@@ -0,0 +1,2 @@
imports:
- { resource: "@MonsieurBizSyliusHomepagePlugin/Resources/config/config.yaml" }
@@ -0,0 +1,18 @@
monsieurbiz_sylius_homepage_admin:
resource: "@MonsieurBizSyliusHomepagePlugin/Resources/config/routes/admin.yaml"
prefix: /%sylius_admin.path_name%
monsieurbiz_sylius_homepage_homepage:
path: /{_locale}/
methods: [GET]
requirements:
_locale: ^[a-z]{2}(?:_[A-Z]{2})?$
defaults:
_controller: monsieurbiz_homepage.controller.homepage:indexAction
_sylius:
template: '@MonsieurBizSyliusHomepagePlugin/Homepage/index.html.twig'
repository:
method: findOneByChannelAndLocale
arguments:
- "expr:service('sylius.context.channel').getChannel()"
- "expr:service('sylius.context.locale').getLocaleCode()"
@@ -0,0 +1,10 @@
{
"bundles": {
"MonsieurBiz\\SyliusHomepagePlugin\\MonsieurBizSyliusHomepagePlugin": [
"all"
]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/"
}
}