Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Page.yml.orm and routing.yml #13

Merged
merged 2 commits into from
Aug 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Resources/config/doctrine/Page.orm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ BitBag\CmsPlugin\Entity\Page:
type: boolean
manyToMany:
products:
targetEntity: Sylius\Component\Core\Model\Product
targetEntity: Sylius\Component\Product\Model\ProductInterface
joinTable:
name: bitbag_cms_page_products
joinColumns:
page_id:
referencedColumnName: id
inverseJoinColumns:
product_id:
referencedColumnName: id
referencedColumnName: id
6 changes: 4 additions & 2 deletions src/Resources/config/routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ bitbag_ajax_generate_page_slug:
_controller: BitBagCmsPlugin:PageSlug:generate

bitbag_cms_shop_page_show:
path: /page/{slug}
path: /{_locale}/page/{slug}
requirements:
_locale: ^[a-z]{2}(?:_[A-Z]{2})?$
methods: [GET]
defaults:
_controller: bitbag.controller.page:showAction
Expand All @@ -24,4 +26,4 @@ bitbag_cms_shop_page_show:
arguments:
- "expr:service('sylius.context.channel').getChannel()"
- "expr:service('sylius.context.locale').getLocaleCode()"
- $slug
- $slug