sylius_admin_payment_method:
    resource: |
        alias: sylius.payment_method
        section: admin
        templates: "@SyliusAdmin\\Crud"
        except: ['show']
        redirect: update
        grid: sylius_admin_payment_method
        permission: true
        vars:
            all:
                subheader: sylius.ui.manage_payment_methods_available_to_your_customers
                templates:
                    form: "@SyliusAdmin/PaymentMethod/_form.html.twig"
            index:
                icon: payment
    type: sylius.resource

sylius_admin_payment_method_create:
    path: /payment-methods/new/{factory}
    methods: [GET, POST]
    defaults:
        _controller: sylius.controller.payment_method::createAction
        _sylius:
            section: admin
            factory:
                method: createWithGateway
                arguments:
                    gatewayFactory: $factory
            template: "@SyliusAdmin/Crud/create.html.twig"
            redirect: sylius_admin_payment_method_update
            permission: true
            vars:
                subheader: sylius.ui.manage_payment_methods_available_to_your_customers
                templates:
                    form: "@SyliusAdmin/PaymentMethod/_form.html.twig"
                route:
                    parameters:
                        factory: $factory
