sylius_admin_product_attribute:
    resource: |
        alias: sylius.product_attribute
        section: admin
        templates: SyliusAdminBundle:Crud
        except: ['show', 'create']
        redirect: update
        grid: sylius_admin_product_attribute
        vars:
            all:
                subheader: sylius.ui.manage_attributes_of_your_products
                templates:
                    form: SyliusAdminBundle: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
        type: text
        _sylius:
            section: admin
            factory:
                method: createTyped
                arguments:
                    type: $type
            template: SyliusAdminBundle:Crud:create.html.twig
            redirect: sylius_admin_product_attribute_update
            vars:
                subheader: sylius.ui.manage_attributes_of_your_products
                templates:
                    form: SyliusAdminBundle:ProductAttribute:_form.html.twig

sylius_admin_get_attribute_types:
    path: /attribute-types
    methods: [GET]
    defaults:
        _controller: sylius.controller.product_attribute:getAttributeTypesAction
        template: SyliusAdminBundle:ProductAttribute/Types:attributeTypes.html.twig

sylius_admin_product_attribute:
    resource: |
        alias: sylius.product_attribute
        section: admin
        templates: SyliusAdminBundle:Crud
        except: ['show', 'create']
        redirect: update
        grid: sylius_admin_product_attribute
        vars:
            all:
                subheader: sylius.ui.manage_attributes_of_your_products
                templates:
                    form: SyliusAdminBundle: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: SyliusAdminBundle:Crud:create.html.twig
            redirect: sylius_admin_product_attribute_update
            vars:
                subheader: sylius.ui.manage_attributes_of_your_products
                templates:
                    form: SyliusAdminBundle:ProductAttribute:_form.html.twig
                route:
                    parameters:
                        type: $type

sylius_admin_get_attribute_types:
    path: /attribute-types
    methods: [GET]
    defaults:
        _controller: sylius.controller.product_attribute:getAttributeTypesAction
        template: SyliusAdminBundle:ProductAttribute/Types:attributeTypes.html.twig

Fix attribute creation bug in new admin
[Admin] Fix attribute creation bug in new admin
