sylius_admin_product_attribute:
    resource: |
        alias: sylius.product_attribute
        section: admin
        templates: "@SyliusAdmin\\Crud"
        except: ['show', 'create']
        redirect: update
        grid: sylius_admin_product_attribute
        permission: true
        vars:
            all:
                subheader: sylius.ui.manage_attributes_of_your_products
                templates:
                    form: "@SyliusAdmin/ProductAttribute/_form.html.twig"
            index:
                icon: cubes
    type: sylius.resource

sylius_admin_product_attribute_create:
    path: /product-attributes/{type}/new
    methods: [GET, POST]
    defaults:
        _controller: sylius.controller.product_attribute::createAction
        _sylius:
            section: admin
            factory:
                method: createTyped
                arguments:
                    type: $type
            template: "@SyliusAdmin/Crud/create.html.twig"
            redirect: sylius_admin_product_attribute_update
            permission: true
            vars:
                subheader: sylius.ui.manage_attributes_of_your_products
                templates:
                    form: "@SyliusAdmin/ProductAttribute/_form.html.twig"
                route:
                    parameters:
                        type: $type
