bitbag_sylius_cms_plugin_shop_section_show:
    path: /section/{code}
    methods: [GET]
    defaults:
        _controller: bitbag_sylius_cms_plugin.controller.section:showAction
        _sylius:
            template: $template
            repository:
                method: findOneByCode
                arguments:
                    - $code
                    - "expr:service('sylius.context.locale').getLocaleCode()"

bitbag_sylius_cms_plugin_shop_section_show_codes:
    path: /sections/{codes}
    methods: [GET]
    defaults:
        _controller: bitbag_sylius_cms_plugin.controller.section:indexAction
        _sylius:
            template: $template
            repository:
                method: findByCodesAndLocale
                arguments:
                    - $codes
                    - "expr:service('sylius.context.locale').getLocaleCode()"

