easy_admin:
    entities:
        Videos:
            controller: App\Controller\Admin\VideosAdminController
            class: App\Entity\Videos

#            Entity mapping
#            - id
#            - title
#            - createdAt
#            - updatedAt
#            - display
#            - src
#            - image
#            - imageFile
#            - seo

            form:
                role: ROLE_WRITER
                fields:
                    -
                      type: 'group'
                      css_class: 'col-sm-6'
                      label: 'tab.videos'
                    -
                      property: 'title'
                      label: 'label.title'
                    -
                      property: 'display'
                      label: 'label.display'
                    -
                      property: 'src'
                      label: 'label.src.video'
                    -
                      property: 'imageFile'
                      label: 'label.image.video'
                      base_path: '/uploads/videos'
                      template: 'vich_uploader_image.html.twig'

                    -
                      type: 'group'
                      css_class: 'col-sm-6'
                      label: 'tab.seo'
                    -
                      property: 'seo'
                      label: 'label.seo'
                      type: 'App\Form\SeoType'

            list:
                role: ROLE_VISITOR
                dql_filter: "entity.isDeleted = false"
                fields:
                    - id
                    -
                      property: 'title'
                      label: 'label.title'
                    -
                      property: 'display'
                      label: 'label.display'
                      type: 'toggle'
                    -
                      property: 'src'
                      label: 'label.src.video'
                    -
                      property: 'image'
                      label: 'label.image.label'
                      type: 'image'
                      base_path: '/uploads/videos'

            show:
                role: ROLE_VISITOR
                fields:
                    - id
                    -
                      property: 'title'
                      label: 'label.title'
                    -
                      property: 'display'
                      label: 'label.display'
                      type: 'toggle'
                    -
                      property: 'src'
                      label: 'label.src'
                    -
                      property: 'image'
                      label: 'label.image.label'
                      type: 'image'
                      base_path: '/uploads/videos'
                    -
                      property: 'seo'
                      label: 'label.seo'
                      template: 'seo_field_type.html.twig'

                    -
                      property: 'updatedAt'
                      label: 'label.updatedAt'
                      type: 'datetime'

            new:
                role: ROLE_WRITER
                fields:
                    - property: 'imageFile'
                      type: 'vich_image'
                      type_options:
                        required: true
            edit:
                role: ROLE_WRITER
                fields:
                    - property: 'imageFile'
                      type: 'vich_image'
                      type_options:
                        required: false

            delete:
                role: ROLE_ADMIN