bitbag_sylius_cms_plugin_shop_page_show:
    path: /page/{slug}
    methods: [GET]
    defaults:
        _controller: bitbag_sylius_cms_plugin.controller.page.overriden:showAction
        _sylius:
            template: "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig"
            repository:
                method: findOneEnabledBySlugAndChannelCode
                arguments:
                    - $slug
                    - "expr:service('sylius.context.locale').getLocaleCode()"
                    - "expr:service('sylius.context.channel').getChannel().getCode()"

bitbag_sylius_cms_plugin_shop_page_show_link_by_code:
    path: /page/link/{code}
    methods: [GET]
    defaults:
        _controller: bitbag_sylius_cms_plugin.controller.page.overriden:renderLinkAction
        _sylius:
            template: $template
            repository:
                method: findOneEnabledByCode
                arguments:
                    - $code
                    - "expr:service('sylius.context.locale').getLocaleCode()"

bitbag_sylius_cms_plugin_shop_page_index_by_section_code:
    path: /pages/{sectionCode}
    methods: [GET]
    defaults:
        _controller: bitbag_sylius_cms_plugin.controller.page.overriden:indexAction
        _sylius:
            template: "@BitBagSyliusCmsPlugin/Shop/Page/index.html.twig"
            grid: bitbag_sylius_cms_plugin_shop_page
            repository:
                method: findBySectionCode
                arguments:
                    - $sectionCode
                    - "expr:service('sylius.context.locale').getLocaleCode()"

bitbag_sylius_cms_plugin_shop_page_index_by_section_code_no_grid:
    path: /pages/{sectionCode}/no-grid
    methods: [GET]
    defaults:
        _controller: bitbag_sylius_cms_plugin.controller.page.overriden:indexAction
        _sylius:
            template: "@BitBagSyliusCmsPlugin/Shop/Page/index.html.twig"
            repository:
                method: findBySectionCode
                arguments:
                    - $sectionCode
                    - "expr:service('sylius.context.locale').getLocaleCode()"

bitbag_sylius_cms_plugin_shop_page_index_by_section_code_template:
    path: /pages-template/{sectionCode}
    methods: [GET]
    defaults:
        _controller: bitbag_sylius_cms_plugin.controller.page.overriden:indexAction
        _sylius:
            template: $template
            grid: bitbag_sylius_cms_plugin_shop_page
            repository:
                method: findBySectionCode
                arguments:
                    - $sectionCode
                    - "expr:service('sylius.context.locale').getLocaleCode()"
