services:
    admin.examen_type:
        class: App\Admin\ExamenTypeAdmin
        arguments: [~, App\Entity\ExamenType, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, group: Examens, label: Types d'Examens }
        public: true

    admin.nature_examen:
        class: App\Admin\NatureExamenAdmin
        arguments: [~, App\Entity\NatureExamen, ~]
        tags:
            - { name: sonata.admin, manager_type: orm, group: Examens, label: Natures d'Examens }
        public: true

    admin.ajout_devoir:
        class: App\Admin\AjoutDevoirAdmin
        arguments: [~, App\Entity\Devoir, App\Controller\Admin\AjoutDevoirAdminController]
        calls:
            - [setTemplate, ['edit', 'admin/Devoir/new.html.twig']]
        tags:
            - { name: sonata.admin, manager_type: orm, group: admin, label: Devoir pour multiple classe }
        public: true

    admin.les_devoir:
        class: App\Admin\LesDevoirAdmin
        arguments: [~, App\Entity\LesDevoirs, App\Controller\Admin\LesDevoirAdminController]
        calls:
            - [setTemplate, ['edit', 'admin/LesDevoir/new.html.twig']]
        tags:
            - { name: sonata.admin, manager_type: orm, group: admin, label: Liste Multi Examens }
        public: true

    admin.devoir:
        class: App\Admin\DevoirAdmin
        arguments: [~, App\Entity\Devoir, App\Controller\Admin\DevoirAdminController]
        calls:
            - [setTemplate, ['edit', 'admin/Devoir/edit.html.twig']]
        tags:
            - { name: sonata.admin, manager_type: orm, group: admin, label: Liste des Examens , default: true}
        public: true

    admin.note:
        class: App\Admin\NoteAdmin
        arguments: [~, App\Entity\Note,~ ]
        tags:
            - { name: sonata.admin, manager_type: orm, group: admin, label: Notes des Examens , default: true}
        public: true


    admin.extension.workflow_devoir:
        class: Yokai\SonataWorkflow\Admin\Extension\WorkflowExtension
        public: true
        arguments:
            - '@workflow.registry'
            - render_actions: [edit,show]
              workflow_name: devoir
              no_transition_label: 'Pas_transition_devoir'
              no_transition_icon: 'fa fa-times'
              dropdown_transitions_label: 'Etat_devoir'
              dropdown_transitions_icon: 'fa fa-code-fork'
              transitions_default_icon: 'fa fa-step-forward'
              transitions_icons:
                  ajout_note: 'fa fa-check'
                  validation: 'fa fa-lock'

sonata_admin:
    extensions:
        admin.extension.workflow_devoir:
            admins:
                - admin.devoir
