module.config.php 28.7 KB
Newer Older
Bertrand Gauthier's avatar
Bertrand Gauthier committed
1
<?php
2

Bertrand Gauthier's avatar
Bertrand Gauthier committed
3
4
namespace UnicaenApp;

5
use UnicaenApp\Controller\CacheControllerFactory;
6
use UnicaenApp\Controller\InstadiaControllerFactory;
7
8
9
10
use UnicaenApp\Form\View\Helper\FormControlGroup;
use UnicaenApp\Form\View\Helper\FormControlGroupFactory;
use UnicaenApp\Message\View\Helper\MessageHelper;
use UnicaenApp\Message\View\Helper\MessageHelperFactory;
11
use UnicaenApp\ORM\Event\Listeners\HistoriqueListenerFactory;
12
use UnicaenApp\Service\InstadiaServiceFactory;
13
14
use UnicaenApp\Service\Mailer\MailerService;
use UnicaenApp\Service\Mailer\MailerServiceFactory;
15
use UnicaenApp\ServiceManager\ServiceLocatorAwareInitializer;
16
17
18
19
20
use UnicaenApp\View\Helper\AppInfos;
use UnicaenApp\View\Helper\AppInfosFactory;
use UnicaenApp\View\Helper\AppLink;
use UnicaenApp\View\Helper\AppLinkFactory;
use UnicaenApp\View\Helper\HeadLink;
21
use UnicaenApp\View\Helper\HeadLinkFactory;
22
use UnicaenApp\View\Helper\HeadScript;
23
use UnicaenApp\View\Helper\HeadScriptFactory;
24
use UnicaenApp\View\Helper\InlineScript;
25
use UnicaenApp\View\Helper\InlineScriptFactory;
26
use UnicaenApp\View\Helper\InstadiaViewHelper;
27
use UnicaenApp\View\Helper\InstadiaViewHelperFactory;
28
use UnicaenApp\View\Helper\MessageCollectorHelper;
29
use UnicaenApp\View\Helper\MessageCollectorHelperFactory;
30
31
32
33
34
use UnicaenApp\View\Helper\Messenger;
use UnicaenApp\View\Helper\MessengerFactory;
use UnicaenApp\View\Helper\QueryParams;
use UnicaenApp\View\Helper\QueryParamsHelperFactory;
use UnicaenApp\View\Helper\Upload\UploaderHelper;
35
use UnicaenApp\View\Helper\Upload\UploaderHelperFactory;
36
use UnicaenApp\View\Helper\UserProfileSelectFactory;
37
use UnicaenApp\View\Helper\UserProfileSelect;
38

39
return [
40
41
42
43
44
45
46
    'asset_manager'   => [
        'resolver_configs' => [
            'paths' => [
                __DIR__ . '/../public',
            ],
        ],
    ],
47
48
    'router'          => [
        'routes' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
49
            // Base “route”, which describes the base match needed, the root of the tree
50
            'home'             => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
51
                // The Literal route is for doing exact matching of the URI path
52
                'type'    => 'Literal',
53
                'options' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
54
                    'route'    => '/',
55
                    'defaults' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
56
57
                        'controller' => 'Application\Controller\Index',
                        'action'     => 'index',
58
59
60
                    ],
                ],
            ],
61
            // A propos
62
            'apropos'          => [
63
                'type'     => 'Literal',
64
                'options'  => [
65
                    'route'    => '/apropos',
66
                    'defaults' => [
67
68
                        'controller' => 'UnicaenApp\Controller\Application',
                        'action'     => 'apropos',
69
70
                    ],
                ],
71
                'priority' => 9999,
72
            ],
Bertrand Gauthier's avatar
Bertrand Gauthier committed
73
            // Contact
74
            'contact'          => [
75
                'type'     => 'Literal',
76
                'options'  => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
77
                    'route'    => '/contact',
78
                    'defaults' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
79
80
                        'controller' => 'UnicaenApp\Controller\Application',
                        'action'     => 'contact',
81
82
                    ],
                ],
83
                'priority' => 9999,
84
            ],
Bertrand Gauthier's avatar
Bertrand Gauthier committed
85
            // Plan de navigation
86
            'plan'             => [
87
                'type'     => 'Literal',
88
                'options'  => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
89
                    'route'    => '/plan',
90
                    'defaults' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
91
92
                        'controller' => 'UnicaenApp\Controller\Application',
                        'action'     => 'plan',
93
94
                    ],
                ],
95
                'priority' => 9999,
96
            ],
Bertrand Gauthier's avatar
Bertrand Gauthier committed
97
            // Mentions légales
98
            'mentions-legales' => [
99
                'type'     => 'Literal',
100
                'options'  => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
101
                    'route'    => '/mentions-legales',
102
                    'defaults' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
103
104
                        'controller' => 'UnicaenApp\Controller\Application',
                        'action'     => 'mentions-legales',
105
106
                    ],
                ],
107
                'priority' => 9999,
108
            ],
Bertrand Gauthier's avatar
Bertrand Gauthier committed
109
            // Informatique et libertés
110
            'il'               => [
111
                'type'     => 'Literal',
112
                'options'  => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
113
                    'route'    => '/informatique-et-libertes',
114
                    'defaults' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
115
116
                        'controller' => 'UnicaenApp\Controller\Application',
                        'action'     => 'informatique-et-libertes',
117
118
                    ],
                ],
119
                'priority' => 9999,
120
            ],
121
            // Rafraîchissement de la session
122
            'refresh-session'  => [
123
                'type'    => 'Literal',
124
                'options' => [
125
                    'route'    => '/refresh-session',
126
                    'defaults' => [
127
128
                        'controller' => 'UnicaenApp\Controller\Application',
                        'action'     => 'refresh-session',
129
130
                    ],
                ],
131
            ],
132
133
134
135
136
137
138
139
140
141
142
            //            // Rendu du menu secondaire
            //            'menu-secondaire' => [
            //                'type'          => 'Literal',
            //                'options'       => [
            //                    'route'       => '/menu-secondaire',
            //                    'defaults'    => [
            //                        'controller' => 'UnicaenApp\Controller\Application',
            //                        'action'     => 'menu-secondaire',
            //                    ],
            //                ],
            //            ],
143
            // Test d'envoi de mail par l'appli
144
145
146
147
148
            'test-envoi-mail'  => [
                'type'    => 'Literal',
                'options' => [
                    'route'    => '/test-envoi-mail',
                    'defaults' => [
149
150
151
152
                        'controller' => 'UnicaenApp\Controller\Application',
                        'action'     => 'test-envoi-mail',
                    ],
                ],
153
            ],
154
155
156
157
158
            'maintenance'      => [
                'type'    => 'Literal',
                'options' => [
                    'route'    => '/maintenance',
                    'defaults' => [
159
160
161
162
163
                        'controller' => 'UnicaenApp\Controller\Application',
                        'action'     => 'maintenance',
                    ],
                ],
            ],
164
            'cache'            => [
165
                'type'          => 'Literal',
166
167
                'options'       => [
                    'route'    => '/cache',
168
169
170
171
172
173
                    'defaults' => [
                        'controller' => 'UnicaenApp\Controller\Cache',
                    ],
                ],
                'may_terminate' => false,
                'child_routes'  => [
174
                    'js'  => [
175
                        'type'          => 'Segment',
176
177
                        'options'       => [
                            'route'    => '/js[/:version]',
178
                            'defaults' => [
179
                                'action' => 'js',
180
181
182
183
184
                            ],
                        ],
                        'may_terminate' => true,
                    ],
                    'css' => [
185
                        'type'          => 'Segment',
186
187
                        'options'       => [
                            'route'    => '/css[/:version]',
188
                            'defaults' => [
189
                                'action' => 'css',
190
191
192
193
194
195
                            ],
                        ],
                        'may_terminate' => true,
                    ],
                ],
            ],
196
            'instadia'         => [
197
198
199
200
201
                'type'          => 'Literal',
                'options'       => [
                    'route'    => '/instadia',
                    'defaults' => [
                        '__NAMESPACE__' => 'UnicaenApp\Controller',
202
203
                        'controller'    => 'Instadia',
                        'action'        => 'index',
204
205
206
207
                    ],
                ],
                'may_terminate' => true,
            ],
Bertrand Gauthier's avatar
Bertrand Gauthier committed
208
209
210
211
            // The following is a route to simplify getting started creating
            // new controllers and actions without needing to create a new
            // module. Simply drop new controllers in, and you can access them
            // using the path /application/:controller/:action
212
            'application'      => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
213
                // The Literal route is for doing exact matching of the URI path
214
215
                'type'          => 'Literal',
                'options'       => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
216
                    'route'    => '/application',
217
                    'defaults' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
218
219
220
                        '__NAMESPACE__' => 'Application\Controller',
                        'controller'    => 'Index',
                        'action'        => 'index',
221
222
                    ],
                ],
Bertrand Gauthier's avatar
Bertrand Gauthier committed
223
224
225
                // Hints to the router that no other segments will follow it
                'may_terminate' => true,
                // Additional routes that stem from the base “route” (i.e., build from it)
226
227
                'child_routes'  => [
                    'default' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
228
229
                        // A Segment route allows matching any segment of a URI path
                        'type'    => 'Segment',
230
231
232
                        'options' => [
                            'route'       => '/[:controller[/:action]]',
                            'constraints' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
233
234
                                'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
                                'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
235
236
                            ],
                            'defaults'    => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
237
//                                'action' => 'index',
238
239
240
241
242
243
244
245
246
247
248
                            ],
                        ],
                    ],
                ],
            ],
        ],
    ],
    'service_manager' => [
        'factories'          => [
            'translator'                  => 'Zend\I18n\Translator\TranslatorServiceFactory',
            'navigation'                  => 'Zend\Navigation\Service\DefaultNavigationFactory',
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
            // service de gestion de la session
            'Zend\Session\SessionManager' => 'UnicaenApp\Session\SessionManagerFactory',
            // service d'accès aux options de config de ce module
            'unicaen-app_module_options'  => 'UnicaenApp\Options\ModuleOptionsFactory',
            // mapper d'accès aux individus de l'annuaire LDAP
            'ldap_people_mapper'          => 'UnicaenApp\Mapper\Ldap\PeopleFactory',
            // mapper d'accès aux groupes de l'annuaire LDAP
            'ldap_group_mapper'           => 'UnicaenApp\Mapper\Ldap\GroupFactory',
            // mapper d'accès aux structures de l'annuaire LDAP
            'ldap_structure_mapper'       => 'UnicaenApp\Mapper\Ldap\StructureFactory',
            // service de manipulation des individus de l'annuaire LDAP
            'ldap_people_service'         => 'UnicaenApp\Service\Ldap\PeopleFactory',
            // service de manipulation des groupes de l'annuaire LDAP
            'ldap_group_service'          => 'UnicaenApp\Service\Ldap\GroupFactory',
            // service de manipulation des structures de l'annuaire LDAP
            'ldap_structure_service'      => 'UnicaenApp\Service\Ldap\StructureFactory',
Laurent Lécluse's avatar
Laurent Lécluse committed
265
266
267
268

            // Gestion des CSV
            'ViewCsvRenderer'             => 'UnicaenApp\Mvc\Service\ViewCsvRendererFactory',
            'ViewCsvStrategy'             => 'UnicaenApp\Mvc\Service\ViewCsvStrategyFactory',
269

270
271
272
273
            // Gestion des exports XML
            'ViewXmlRenderer'             => 'UnicaenApp\Mvc\Service\ViewXmlRendererFactory',
            'ViewXmlStrategy'             => 'UnicaenApp\Mvc\Service\ViewXmlStrategyFactory',

274
            'MessageCollector' => 'UnicaenApp\Service\MessageCollectorFactory',
275

276
277
278
            'MessageConfig'     => 'UnicaenApp\Message\MessageConfigFactory',
            'MessageRepository' => 'UnicaenApp\Message\MessageRepositoryFactory',
            'MessageService'    => 'UnicaenApp\Message\MessageServiceFactory',
279
280
281
282
283
284
285
286
287
288
289

            'MouchardService'              => 'UnicaenApp\Mouchard\MouchardServiceFactory',
            'MouchardListenerErrorHandler' => 'UnicaenApp\Mouchard\MouchardListenerErrorHandlerFactory',
            'MouchardListenerException'    => 'UnicaenApp\Mouchard\MouchardListenerExceptionFactory',
            'MouchardListenerMessenger'    => 'UnicaenApp\Mouchard\MouchardListenerMessengerFactory',
            'MouchardFormaterHtml'         => 'UnicaenApp\Mouchard\MouchardFormaterHtmlFactory',
            'MouchardSenderMail'           => 'UnicaenApp\Mouchard\MouchardSenderMailFactory',
            'MouchardSenderException'      => 'UnicaenApp\Mouchard\MouchardSenderExceptionFactory',
            'MouchardCompleterHttp'        => 'UnicaenApp\Mouchard\MouchardCompleterHttpFactory',
            'MouchardCompleterMvc'         => 'UnicaenApp\Mouchard\MouchardCompleterMvcFactory',

290
            MailerService::class => MailerServiceFactory::class,
291
292

            'instadia'                      => InstadiaServiceFactory::class,
293
294
295
296
297
298
299
300
301
302
        ],
        'shared' => [
            'MouchardListenerErrorHandler' => false,
            'MouchardListenerException'    => false,
            'MouchardListenerMessenger'    => false,
            'MouchardFormaterHtml'         => false,
            'MouchardSenderMail'           => false,
            'MouchardSenderException'      => false,
            'MouchardCompleterHttp'        => false,
            'MouchardCompleterMvc'         => false,
303
304
        ],
        'invokables'         => [
305
        ],
306
        'abstract_factories' => [
307
//            'UnicaenApp\Service\Doctrine\MultipleDbAbstractFactory',
308
309
        ],
        'initializers'       => [
310
            ServiceLocatorAwareInitializer::class,
311
312
            'UnicaenApp\Service\EntityManagerAwareInitializer',
        ],
313
314
315
        'aliases' => [
            'MailerService' => MailerService::class,
        ]
316
317
318
    ],
    'form_elements'   => [
        'invokables'   => [
319
            'UploadForm' => 'UnicaenApp\Controller\Plugin\Upload\UploadForm',
320
321
        ],
        'initializers' => [
322
            'UnicaenApp\Service\EntityManagerAwareInitializer',
323
324
        ],
    ],
325
    'hydrators'       => [
326
327
328
329
        'initializers' => [
            'UnicaenApp\Service\EntityManagerAwareInitializer',
        ],
    ],
330
    'view_helpers'    => [
331
332
333
334
335
336
337
338
339
340
341
342
343
        'aliases' => [
            'appInfos'          => AppInfos::class,
            'appLink'           => AppLink::class,
            'userProfileSelect' => UserProfileSelect::class,
            'Message'           => MessageHelper::class,
            'messenger'         => Messenger::class,
            'queryParams'       => QueryParams::class,
            'formControlGroup'  => FormControlGroup::class,
            'headLink'          => HeadLink::class,
            'headScript'        => HeadScript::class,
            'inlineScript'      => InlineScript::class,
            'instadia'          => InstadiaViewHelper::class,
            'messageCollector'  => MessageCollectorHelper::class,
344
            'uploader'          => UploaderHelper::class,
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
            'Uploader'          => UploaderHelper::class,
        ],
        'factories' => [
            AppInfos::class               => AppInfosFactory::class,
            AppLink::class                => AppLinkFactory::class,
            UserProfileSelect::class      => UserProfileSelectFactory::class,
            MessageHelper::class          => MessageHelperFactory::class,
            Messenger::class              => MessengerFactory::class,
            QueryParams::class            => QueryParamsHelperFactory::class,
            FormControlGroup::class       => FormControlGroupFactory::class,
            HeadLink::class               => HeadLinkFactory::class,
            HeadScript::class             => HeadScriptFactory::class,
            InlineScript::class           => InlineScriptFactory::class,
            InstadiaViewHelper::class     => InstadiaViewHelperFactory::class,
            MessageCollectorHelper::class => MessageCollectorHelperFactory::class,
            UploaderHelper::class         => UploaderHelperFactory::class,
361
362
        ],
        'invokables'   => [
363
364
365
366
367
368
369
370
371
            'appConnection'             => 'UnicaenApp\View\Helper\AppConnection',
            'modalAjaxDialog'           => 'UnicaenApp\View\Helper\ModalAjaxDialog',
            'confirm'                   => 'UnicaenApp\View\Helper\ConfirmHelper',
            'toggleDetails'             => 'UnicaenApp\View\Helper\ToggleDetails',
            'multipageFormFieldset'     => 'UnicaenApp\Form\View\Helper\MultipageFormFieldset',
            'multipageFormNav'          => 'UnicaenApp\Form\View\Helper\MultipageFormNav',
            'multipageFormRow'          => 'UnicaenApp\Form\View\Helper\MultipageFormRow',
            'multipageFormRecap'        => 'UnicaenApp\Form\View\Helper\MultipageFormRecap',
            'formDate'                  => 'UnicaenApp\Form\View\Helper\FormDate',
372
            'formDateTime'              => Form\View\Helper\FormDateTime::class,
373
374
375
376
377
378
            'formDateInfSup'            => 'UnicaenApp\Form\View\Helper\FormDateInfSup',
            'formRowDateInfSup'         => 'UnicaenApp\Form\View\Helper\FormRowDateInfSup',
            'formSearchAndSelect'       => 'UnicaenApp\Form\View\Helper\FormSearchAndSelect',
            'formLdapPeople'            => 'UnicaenApp\Form\View\Helper\FormLdapPeople',
            'formErrors'                => 'UnicaenApp\Form\View\Helper\FormErrors',
            'form'                      => 'UnicaenApp\Form\View\Helper\Form',
379
380
381
            'formAdvancedMultiCheckbox' => 'UnicaenApp\Form\View\Helper\FormAdvancedMultiCheckbox',
            'historique'                => 'UnicaenApp\View\Helper\HistoriqueViewHelper',
            'tabajax'                   => 'UnicaenApp\View\Helper\TabAjax\TabAjaxViewHelper',
382
            'tag'                       => 'UnicaenApp\View\Helper\TagViewHelper',
383
384
        ],
        'initializers' => [
385
            'UnicaenApp\Service\EntityManagerAwareInitializer',
386
            ServiceLocatorAwareInitializer::class,
387
388
389
390
391
        ],
    ],
    'translator'      => [
        'translation_file_patterns' => [
            [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
392
                'type'     => 'phparray',
Bertrand Gauthier's avatar
Bertrand Gauthier committed
393
                'base_dir' => __DIR__ . '/../language',
Bertrand Gauthier's avatar
Bertrand Gauthier committed
394
                'pattern'  => '/%s/Zend_Captcha.php',
395
396
            ],
            [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
397
                'type'     => 'phparray',
Bertrand Gauthier's avatar
Bertrand Gauthier committed
398
                'base_dir' => __DIR__ . '/../language',
Bertrand Gauthier's avatar
Bertrand Gauthier committed
399
                'pattern'  => '/%s/Zend_Validate.php',
400
401
            ],
            [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
402
403
404
                'type'     => 'gettext',
                'base_dir' => __DIR__ . '/../language',
                'pattern'  => '%s.mo',
405
406
407
408
            ],
        ],
    ],
    'controllers'     => [
409
        'invokables'   => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
410
            'UnicaenApp\Controller\Application' => 'UnicaenApp\Controller\ApplicationController',
411
        ],
412
413
414
        'initializers' => [
            'UnicaenApp\Service\EntityManagerAwareInitializer',
        ],
415
416
        'factories' => [
            'UnicaenApp\Controller\Cache' => CacheControllerFactory::class,
417
            'UnicaenApp\Controller\Instadia' => InstadiaControllerFactory::class,
418
        ]
419
    ],
420
    'doctrine' => [
421
422
423
424
425
426
427
428
        'driver' => [
            'orm_app_driver' => [
                'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
                'cache' => 'array',
                'paths' => [
                    __DIR__ . '/../src/UnicaenApp/Entity/Db',
                ],
            ],
429
            'orm_default'    => [
430
431
432
433
434
435
436
                'class'   => 'Doctrine\ORM\Mapping\Driver\DriverChain',
                'drivers' => [
                    'UnicaenApp\Entity\Db' => 'orm_app_driver',
                ],
            ],
        ],
    ],
437
    'view_manager' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
438
        // RouteNotFoundStrategy configuration
439
        'display_not_found_reason' => false, // display 404 reason in template
Bertrand Gauthier's avatar
Bertrand Gauthier committed
440
441
        'not_found_template'       => 'error/404', // e.g. '404'
        // ExceptionStrategy configuration
442
        'display_exceptions'       => false,
Bertrand Gauthier's avatar
Bertrand Gauthier committed
443
444
445
446
447
        'exception_template'       => 'error/index',
        // Doctype with which to seed the Doctype helper
        'doctype'                  => 'HTML5',
        // TemplateMapResolver configuration
        // template/path pairs
448
449
450
451
452
453
454
455
456
457
        'template_map'             => [
            'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
            'error/404'     => __DIR__ . '/../view/error/404.phtml',
            'error/index'   => __DIR__ . '/../view/error/index.phtml',
            //            'unicaen-app/application/apropos'                  => __DIR__ . '/../view/application/apropos.phtml',
            //            'unicaen-app/application/contact'                  => __DIR__ . '/../view/application/contact.phtml',
            //            'unicaen-app/application/plan'                     => __DIR__ . '/../view/application/plan.phtml',
            //            'unicaen-app/application/mentions-legales'         => __DIR__ . '/../view/application/mentions-legales.phtml',
            //            'unicaen-app/application/informatique-et-libertes' => __DIR__ . '/../view/application/informatique-et-libertes.phtml',
        ],
Bertrand Gauthier's avatar
Bertrand Gauthier committed
458
        // TemplatePathStack configuration
459
        'template_path_stack'      => [
460
            __DIR__ . '/../view',
461
        ],
Bertrand Gauthier's avatar
Bertrand Gauthier committed
462
        // Layout template name
463
        'layout'                   => 'layout/layout', // e.g., 'layout/layout'
Bertrand Gauthier's avatar
Bertrand Gauthier committed
464
        // Additional strategies to attach
465
        'strategies'               => [
466
            'ViewJsonStrategy', // register JSON renderer strategy
Laurent Lécluse's avatar
Laurent Lécluse committed
467
            'ViewCsvStrategy', // register CSV renderer strategy
468
//            'ViewXmlStrategy', // register XML renderer strategy
469
470
471
            //            'ViewFeedStrategy', // register Feed renderer strategy
        ],
    ],
Bertrand Gauthier's avatar
Bertrand Gauthier committed
472
    // All navigation-related configuration is collected in the 'navigation' key
473
    'navigation'   => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
474
        // The DefaultNavigationFactory we configured uses 'default' as the sitemap key
475
        'default' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
476
            // And finally, here is where we define our page hierarchy
477
478
479
480
481
482
483
            'home' => [
                'label' => _("Accueil"),
                'title' => _("Page d'accueil de l'application"),
                'route' => 'home',
                'order' => -100, // make sure home is the first page
                'pages' => [
                    'etab'                     => [
484
485
                        'label'    => _("Université de Caen Normandie"),
                        'title'    => _("Page d'accueil du site de l'Université de Caen Normandie"),
486
487
488
489
490
                        'uri'      => 'http://www.unicaen.fr/',
                        'class'    => 'ucbn',
                        'visible'  => false,
                        'footer'   => true, // propriété maison pour inclure cette page dans le menu de pied de page
                        'resource' => 'controller/UnicaenApp\Controller\Application:etab', // ACL (cf. module BjyAuthorize)
491
                        'order'    => 1000,
492
493
                    ],
                    'apropos'                  => [
494
495
496
                        'label'    => _("À propos"),
                        'title'    => _("À propos de cette application"),
                        'route'    => 'apropos',
497
                        'class'    => 'apropos',
498
499
500
501
                        'visible'  => false,
                        'footer'   => true, // propriété maison pour inclure cette page dans le menu de pied de page
                        'sitemap'  => true, // propriété maison pour inclure cette page dans le plan
                        'resource' => 'controller/UnicaenApp\Controller\Application:apropos',
502
                        'order'    => 1001,
503
504
                    ],
                    'contact'                  => [
505
506
507
                        'label'    => _("Contact"),
                        'title'    => _("Contact concernant l'application"),
                        'route'    => 'contact',
508
                        'class'    => 'contact',
509
510
511
512
                        'visible'  => false,
                        'footer'   => true, // propriété maison pour inclure cette page dans le menu de pied de page
                        'sitemap'  => true, // propriété maison pour inclure cette page dans le plan
                        'resource' => 'controller/UnicaenApp\Controller\Application:contact',
513
                        'order'    => 1002,
514
515
                    ],
                    'plan'                     => [
516
517
518
                        'label'    => _("Plan de navigation"),
                        'title'    => _("Plan de navigation au sein de l'application"),
                        'route'    => 'plan',
519
                        'class'    => 'plan',
520
521
522
523
                        'visible'  => false,
                        'footer'   => true, // propriété maison pour inclure cette page dans le menu de pied de page
                        'sitemap'  => true, // propriété maison pour inclure cette page dans le plan
                        'resource' => 'controller/UnicaenApp\Controller\Application:plan',
524
                        'order'    => 1003,
525
526
                    ],
                    'mentions-legales'         => [
527
528
                        'label'    => _("Mentions légales"),
                        'title'    => _("Mentions légales"),
529
                        'uri'      => 'http://www.unicaen.fr/acces-direct/mentions-legales/',
530
                        'class'    => 'ml',
531
532
533
534
                        'visible'  => false,
                        'footer'   => true, // propriété maison pour inclure cette page dans le menu de pied de page
                        'sitemap'  => true, // propriété maison pour inclure cette page dans le plan
                        'resource' => 'controller/UnicaenApp\Controller\Application:mentions-legales',
535
                        'order'    => 1004,
536
537
                    ],
                    'informatique-et-libertes' => [
538
539
                        'label'    => _("Informatique et libertés"),
                        'title'    => _("Informatique et libertés"),
540
                        'uri'      => 'http://www.unicaen.fr/acces-direct/informatique-et-libertes/',
541
                        'class'    => 'il',
542
543
544
545
                        'visible'  => false,
                        'footer'   => true, // propriété maison pour inclure cette page dans le menu de pied de page
                        'sitemap'  => true, // propriété maison pour inclure cette page dans le plan
                        'resource' => 'controller/UnicaenApp\Controller\Application:informatique-et-libertes',
546
                        'order'    => 1005,
547
548
549
550
551
                    ],
                ],
            ],
        ],
    ],
552
    'public_files' => [
553
        'head_scripts'          => [
554
555
            '010_jquery'   => 'https://gest.unicaen.fr/public/jquery-1.11.3.min.js',
            '020_jqueryui' => 'https://gest.unicaen.fr/public/jquery-ui-1.11.4/jquery-ui.min.js',
556
        ],
557
558
559
        'inline_scripts'        => [
            '010_bootstrap'   => 'https://gest.unicaen.fr/public/bootstrap-3.3.5/js/bootstrap.min.js',
            '020_app'         => '/js/app.js',
560
561
            '030_util'        => '/unicaen/app/js/util.js',
            '040_unicaen'     => '/unicaen/app/js/unicaen.js',
562
            '050_jquery_form' => 'https://gest.unicaen.fr/public/jquery.form-3.51.js' // pour l'uploader Unicaen uniquement!!,
563
        ],
564
        'stylesheets'           => [
565
566
567
568
569
            '010_jquery-ui'           => 'https://gest.unicaen.fr/public/jquery-ui-1.11.4/jquery-ui.min.css',
            '020_jquery-ui-structure' => 'https://gest.unicaen.fr/public/jquery-ui-1.11.4/jquery-ui.structure.min.css',
            '030_jquery-ui-theme'     => 'https://gest.unicaen.fr/public/jquery-ui-1.11.4/jquery-ui.theme.min.css',
            '040_bootstrap'           => 'https://gest.unicaen.fr/public/bootstrap-3.3.5/css/bootstrap.min.css',
            '050_bootstrap-theme'     => 'https://gest.unicaen.fr/public/bootstrap-3.3.5/css/bootstrap-theme.min.css',
570
            '060_unicaen'             => '/unicaen/app/css/unicaen.css',
571
            '070_app'                 => '/css/app.css',
572
        ],
573
        'printable_stylesheets' => [
574
        ],
575
        'cache_enabled'         => false,
576
    ],
577
    'bjyauthorize' => [
578
579
        'guards' => [
            'BjyAuthorize\Guard\Controller' => [
580
581
582
583
584
                [
                    'controller' => 'UnicaenApp\Controller\Application',
                    'action'     => ['maintenance'],
                    'roles'      => [],
                ],
585
586
                [
                    'controller' => 'UnicaenApp\Controller\Cache',
587
                    'action'     => ['js', 'css', 'printable-css'],
588
                    'roles'      => [],
589
                ],
590
591
592
593
594
                [
                    'controller' => 'UnicaenApp\Controller\Instadia',
                    'action'     => ['index'],
                    'roles'      => [],
                ],
595
596
            ],
        ],
597
    ],
598
];