bitbag_sylius_cms_plugin_shop_block_render:
    path: /block/{code}
    methods: [GET]
    defaults:
        _controller: bitbag_sylius_cms_plugin.controller.block:renderBlockAction
        _sylius:
            repository:
                method: findOneByCode
                arguments:
                    - $code

bitbag_sylius_cms_plugin_shop_block_index_by_section_code:
    path: /blocks/section/{sectionCode}
    methods: [GET]
    defaults:
        _controller: bitbag_sylius_cms_plugin.controller.block:indexAction
        _sylius:
            template: $template
            repository:
                method: findBySectionCode
                arguments:
                    - $sectionCode
                    - "expr:service('sylius.context.locale').getLocaleCode()"
                    - "expr:service('sylius.context.channel').getChannel().getCode()"

bitbag_sylius_cms_plugin_shop_block_index_by_product_code:
    path: /blocks/product/{productCode}
    methods: [GET]
    defaults:
        _controller: bitbag_sylius_cms_plugin.controller.block:indexAction
        _sylius:
            template: $template
            repository:
                method: findByProductCode
                arguments:
                    - $productCode
                    - "expr:service('sylius.context.locale').getLocaleCode()"
                    - "expr:service('sylius.context.channel').getChannel().getCode()"
