Skip to content

Commit 896c6cb

Browse files
author
Maxime Leclercq
committed
feat: add receipe v2 for homepage plugin
1 parent 55672a9 commit 896c6cb

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
imports:
2+
- { resource: "@MonsieurBizSyliusHomepagePlugin/Resources/config/config.yaml" }
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
monsieurbiz_sylius_homepage_admin:
2+
resource: "@MonsieurBizSyliusHomepagePlugin/Resources/config/routes/admin.yaml"
3+
prefix: /%sylius_admin.path_name%
4+
5+
monsieurbiz_sylius_homepage_homepage:
6+
path: /{_locale}/
7+
methods: [GET]
8+
requirements:
9+
_locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$
10+
defaults:
11+
_controller: monsieurbiz_homepage.controller.homepage::indexAction
12+
_sylius:
13+
template: '@MonsieurBizSyliusHomepagePlugin/shop/homepage/index.html.twig'
14+
repository:
15+
method: findOneByChannelAndLocale
16+
arguments:
17+
- "expr:service('sylius.context.channel').getChannel()"
18+
- "expr:service('sylius.context.locale').getLocaleCode()"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"bundles": {
3+
"MonsieurBiz\\SyliusHomepagePlugin\\MonsieurBizSyliusHomepagePlugin": [
4+
"all"
5+
]
6+
},
7+
"copy-from-recipe": {
8+
"config/": "%CONFIG_DIR%/"
9+
}
10+
}

0 commit comments

Comments
 (0)