sylius_grid:
    grids:
        sylius_admin_payment_method:
            driver:
                name: doctrine/orm
                options:
                    class: %sylius.model.payment_method.class%
            fields:
                code:
                    type: string
                    label: sylius.ui.code
                name:
                    type: string
                    label: sylius.ui.name
                gateway:
                    type: twig
                    label: sylius.ui.gateway
                    options:
                        template: SyliusAdminBundle:Grid/Field:label.html.twig
                enabled:
                    type: twig
                    label: sylius.ui.enabled
                    options:
                        template: SyliusAdminBundle:Grid/Field:enabled.html.twig
            filters:
                code:
                    type: string
                    label: sylius.ui.code
                enabled:
                    type: boolean
                    label: sylius.ui.enabled
            actions:
                main:
                    create:
                        type: create
                item:
                    update:
                        type: update
                    delete:
                        type: delete

sylius_grid:
    grids:
        sylius_admin_payment_method:
            driver:
                name: doctrine/orm
                options:
                    class: %sylius.model.payment_method.class%
                    repository:
                        method: createListQueryBuilder
            fields:
                code:
                    type: string
                    label: sylius.ui.code
                name:
                    type: string
                    label: sylius.ui.name
                gateway:
                    type: twig
                    label: sylius.ui.gateway
                    options:
                        template: SyliusAdminBundle:Grid/Field:label.html.twig
                enabled:
                    type: twig
                    label: sylius.ui.enabled
                    options:
                        template: SyliusAdminBundle:Grid/Field:enabled.html.twig
            filters:
                search:
                    type: string
                    label: sylius.ui.search
                    options:
                        fields: [code, translation.name]
                enabled:
                    type: boolean
                    label: sylius.ui.enabled
            actions:
                main:
                    create:
                        type: create
                item:
                    update:
                        type: update
                    delete:
                        type: delete

Add custom query builder to payment method grid in admin
[Admin] Add custom query builder to payment method grid in admin
