#Sonata
sonata_block:
    default_contexts: [cms]
    blocks:
         # enable the SonataAdminBundle block
         sonata.admin.block.admin_list:
             contexts: [admin]
         sonata.user.block.menu:    # used to display the menu in profile pages
         sonata.user.block.account: # used to display menu option (login option)
         sonata.block.service.text: # used to if you plan to use Sonata user routes

sonata_admin:
    title:      Health Valley
    title_logo: bundles/app/images/favicon.png
    show_mosaic_button:   false
    dashboard:
        groups:
            Entreprises:
                on_top: true
                label: ~
                label_catalogue: ~
                icon: '<i class="fa fa-briefcase"></i>'
                items:
                    - admin.company
            Événements:
                on_top: true
                label: ~
                label_catalogue: ~
                icon: '<i class="fa fa-calendar"></i>'
                items:
                    - admin.event
            Emplois:
                label: ~
                label_catalogue: ~
                icon: '<i class="fa fa-user-plus"></i>'
                items:
                    - admin.job
                    - admin.applicant
                   # - admin.jobLinkedIn

            Interview:
                on_top: true
                label: ~
                label_catalogue: ~
                icon: '<i class="fa fa-edit"></i>'
                items:
                    - admin.interview
            Images:
                on_top: true
                label: Gallerie d'images
                label_catalogue: ~
                icon: '<i class="fa fa-picture-o"></i>'
                items:
                    - admin.image
            Utilisateurs:
                on_top: true
                label: ~
                label_catalogue: ~
                icon: '<i class="fa fa-user"></i>'
                items:
                    - admin.user
            Autres contenus:
                label: ~
                label_catalogue: ~
                icon: '<i class="fa fa-folder"></i>'
                items:
                    - admin.sector
                    - admin.canton
    templates:
        user_block: 'AppBundle:Admin:user_block.html.twig'
services:
    admin.company:
        class: AppBundle\Admin\CompagnyAdmin
        arguments: [~, AppBundle\Entity\Compagny, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Entreprises }
    admin.job:
        class: AppBundle\Admin\JobAdmin
        arguments: [~, AppBundle\Entity\Job, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Offre }

    admin.applicant:
        class: AppBundle\Admin\ApplicantAdmin
        arguments: [~, AppBundle\Entity\Applicant, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Demande }

    admin.user:
        class: AppBundle\Admin\UserAdmin
        arguments: [~, AppBundle\Entity\User, AppBundle:CRUD]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Utilisateurs }
        calls:
            - [setUserManager, ['@fos_user.user_manager']]
            - [setRoles, ['%security.role_hierarchy.roles%']]

    admin.sector:
        class: AppBundle\Admin\SectorAdmin
        arguments: [~, AppBundle\Entity\Sector, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Secteur d'activé}

    admin.canton:
        class: AppBundle\Admin\CantonAdmin
        arguments: [~, AppBundle\Entity\Canton, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Canton}
    admin.event:
        class: AppBundle\Admin\EventAdmin
        arguments: [~, AppBundle\Entity\Event, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Event}
    admin.interview:
        class: AppBundle\Admin\InterviewAdmin
        arguments: [~, AppBundle\Entity\Interview, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Interview}
    admin.questionAnswer:
        class: AppBundle\Admin\QuestionAnswerAdmin
        arguments: [~, AppBundle\Entity\QuestionAnswer, ~]
        tags:
            - { name: sonata.admin, manager_type: orm}
    admin.image:
        class: AppBundle\Admin\ImageAdmin
        arguments: [~, AppBundle\Entity\Image, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, label: Image,show_mosaic_button:true}
        calls:
            - [setTemplates, [outer_list_rows_mosaic : 'AppBundle:Admin:list_outer_rows_mosaic.html.twig']]
            - [setTemplates, [inner_list_row : 'AppBundle:Admin:inner_list_row.html.twig' ]]
            - [setTemplates, [base_list_field : 'SonataAdminBundle:CRUD:base_list_flat_field.html.twig' ]]

    oh.GoogleMapFormType.form.type.googlemapformtype:
        class: Oh\GoogleMapFormTypeBundle\Form\Type\GoogleMapType
        tags:
            - { name: form.type, alias: oh_google_maps }