easy_admin:
    entities:
        Events:
            controller: App\Controller\Admin\EventsAdminController
            class: 'App\Entity\Events'

            form:
                role: ROLE_WRITER
                fields:
                    -
                      type: 'group'
                      css_class: 'col-sm-12'
                      label: 'tab.events.info'
                    -
                      property: 'title'
                      label: 'label.title'
                    -
                      property: 'description'
                      label: 'label.description'
                      type: 'FOS\CKEditorBundle\Form\Type\CKEditorType'

                    -
                      type: 'group'
                      css_class: 'col-sm-6'
                      label: 'tab.events.date'
                    -
                      property: 'date'
                      label: 'label.date'
                      type: 'App\Form\EventDatesType'

                    -
                      type: 'group'
                      css_class: 'col-sm-6'
                      label: 'tab.events.location'
                    -
                      property: 'location'
                      label: 'label.location'
                      type: 'App\Form\EventLocationsType'

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

                    -
                      type: 'group'
                      css_class: 'col-sm-6'
                      label: 'tab.events.image'
                    -
                      property: 'imageFile'
                      label: 'label.image.events'
                      base_path: '/uploads/events'
                      template: 'vich_uploader_image.html.twig'

            list:
                role: ROLE_VISITOR
                dql_filter: "entity.isDeleted = false"
                fields:
                    - id
                    -
                      property: 'title'
                      label: 'label.title'
                    -
                      property: 'date'
                      label: 'label.date'
                    -
                      property: 'location'
                      label: 'label.location'
                    -
                      property: 'publishAt'
                      label: 'label.publishAt'
                    -
                      property: 'image'
                      label: 'label.image.label'
                      type: 'image'
                      base_path: '/uploads/events'

            show:
                role: ROLE_VISITOR
                fields:
                    -
                      property: 'title'
                      label: 'label.title'
                    -
                      property: 'description'
                      label: 'label.description'
                      template: 'content_field_type.html.twig'
                    -
                      property: 'seo'
                      label: 'label.seo'
                      template: 'seo_field_type.html.twig'
                    -
                      property: 'date'
                      label: 'label.date'
                    -
                      property: 'location'
                      label: 'label.location'
                    -
                      property: 'publishAt'
                      label: 'label.publishAt'
                      type: 'datetime'
                    -
                      property: 'createdAt'
                      label: 'label.createdAt'
                      type: 'datetime'
                    -
                      property: 'updatedAt'
                      label: 'label.updatedAt'
                      type: 'datetime'
                    -
                      property: 'createdBy'
                      label: 'label.createdBy'
                    -
                      property: 'updatedBy'
                      label: 'label.updatedBy'

                    -
                      property: 'image'
                      label: 'label.image.label'
                      type: 'image'
                      base_path: '/uploads/events'

            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

        EventDates:
            disabled_actions: ['new','delete']
            controller: App\Controller\Admin\EventDatesAdminController
            class: 'App\Entity\EventDates'

            form:
                role: ROLE_WRITER
                fields:
                    -
                      property: 'title'
                      label: 'label.title'
                    -
                      property: 'eventStart'
                      label: 'label.eventStart'
                    -
                      property: 'eventEnd'
                      label: 'label.eventEnd'
                    -
                      property: 'link'
                      label: 'label.link'

            list:
                role: ROLE_VISITOR
                fields:
                    - id
                    -
                      property: 'title'
                      label: 'label.title'
                    -
                      property: 'eventStart'
                      label: 'label.eventStart'
                    -
                      property: 'eventEnd'
                      label: 'label.eventEnd'
                    -
                      property: 'link'
                      label: 'label.link'
                    -
                      property: 'events'
                      label: 'label.events'

            show:
                role: ROLE_VISITOR
                fields:
                    -
                      property: 'title'
                      label: 'label.title'
                    -
                      property: 'eventStart'
                      label: 'label.eventStart'
                    -
                      property: 'eventEnd'
                      label: 'label.eventEnd'
                    -
                      property: 'link'
                      label: 'label.link'
                    -
                      property: 'events'
                      label: 'label.events'

        EventLocations:
            disabled_actions: ['new','delete']
            controller: App\Controller\Admin\EventLocationsAdminController
            class: 'App\Entity\EventLocations'

            form:
                role: ROLE_WRITER
                fields:
                    -
                      property: 'city'
                      label: 'label.city'
                    -
                      property: 'street'
                      label: 'label.street'
                    -
                      property: 'country'
                      label: 'label.country'
                    -
                      property: 'postal'
                      label: 'label.postal'

            list:
                role: ROLE_VISITOR
                fields:
                    - id
                    -
                      property: 'city'
                      label: 'label.city'
                    -
                      property: 'street'
                      label: 'label.street'
                    -
                      property: 'country'
                      label: 'label.country'
                    -
                      property: 'postal'
                      label: 'label.postal'
                    -
                      property: 'events'
                      label: 'label.events'

            show:
                role: ROLE_VISITOR
                fields:
                    -
                      property: 'city'
                      label: 'label.city'
                    -
                      property: 'street'
                      label: 'label.street'
                    -
                      property: 'country'
                      label: 'label.country'
                    -
                      property: 'postal'
                      label: 'label.postal'
                    -
                      property: 'events'
                      label: 'label.events'
