volume-horaire.config.php 3.63 KB
Newer Older
1
2
3
4
<?php

namespace Application;

5
6
7
use Application\Provider\Privilege\Privileges;
use UnicaenAuth\Guard\PrivilegeController;

8
return [
9
    'router'          => [
10
        'routes' => [
lecluse's avatar
#10705    
lecluse committed
11
            'volume-horaire' => [
12
13
14
                'type'          => 'Literal',
                'options'       => [
                    'route'    => '/volume-horaire',
15
                    'defaults' => [
16
17
                        'controller' => 'Application\Controller\VolumeHoraire',
                        'action'     => 'index',
18
19
                    ],
                ],
20
                'may_terminate' => true,
21
22
                'child_routes'  => [
                    'liste'  => [
23
                        'type'    => 'Segment',
24
                        'options' => [
25
                            'route'       => '/liste[/:service]',
26
                            'constraints' => [
27
                                'service' => '[0-9]*',
28
                            ],
29
30
                            'defaults'    => [
                                'action' => 'liste',
31
32
33
34
                            ],
                        ],
                    ],
                    'saisie' => [
35
                        'type'    => 'Segment',
36
                        'options' => [
37
                            'route'       => '/saisie/:service',
38
                            'constraints' => [
39
                                'service' => '[0-9]*',
40
                            ],
41
                            'defaults'    => [
42
                                'action' => 'saisie',
43
44
45
46
47
48
49
                            ],
                        ],
                    ],
                ],
            ],
        ],
    ],
50
    'bjyauthorize'    => [
51
        'guards' => [
52
53
            PrivilegeController::class => [
                /* Enseignements */
54
                [
55
                    'controller' => 'Application\Controller\VolumeHoraire',
56
57
58
59
60
61
62
                    'action'     => ['liste'],
                    'privileges' => Privileges::ENSEIGNEMENT_VISUALISATION,
                ],
                [
                    'controller' => 'Application\Controller\VolumeHoraire',
                    'action'     => ['saisie'],
                    'privileges' => Privileges::ENSEIGNEMENT_EDITION,
63
                    'assertion'  => Assertion\ServiceAssertion::class,
64
                ],
65
66
67
            ],
        ],
    ],
68
    'controllers'     => [
69
        'invokables' => [
lecluse's avatar
#10705    
lecluse committed
70
            'Application\Controller\VolumeHoraire' => Controller\VolumeHoraireController::class,
71
72
73
74
        ],
    ],
    'service_manager' => [
        'invokables' => [
75
76
77
78
79
            Service\VolumeHoraireService::class            => Service\VolumeHoraireService::class,
            Service\VolumeHoraireEnsService::class         => Service\VolumeHoraireEnsService::class,
            Service\VolumeHoraireReferentielService::class => Service\VolumeHoraireReferentielService::class,
            Service\TypeVolumeHoraireService::class        => Service\TypeVolumeHoraireService::class,
            Service\EtatVolumeHoraireService::class        => Service\EtatVolumeHoraireService::class,
80
        ],
81
    ],
82
    'view_helpers'    => [
83
        'invokables' => [
84
85
            'volumeHoraireListe'           => View\Helper\VolumeHoraire\Liste::class,
            'volumeHoraireListeCalendaire' => View\Helper\VolumeHoraire\ListeCalendaire::class,
86
87
        ],
    ],
88
    'form_elements'   => [
89
        'invokables' => [
90
91
            Form\VolumeHoraire\Saisie::class                 => Form\VolumeHoraire\Saisie::class,
            Form\VolumeHoraire\SaisieMultipleFieldset::class => Form\VolumeHoraire\SaisieMultipleFieldset::class, // Nécessite plusieurs instances
92
93
94
        ],
    ],
];