module.config.php 30.4 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
use UnicaenApp\Form\View\Helper\FormControlGroup;
use UnicaenApp\Form\View\Helper\FormControlGroupFactory;
9
10
use UnicaenApp\HostLocalization\HostLocalization;
use UnicaenApp\HostLocalization\HostLocalizationFactory;
11
12
use UnicaenApp\Message\View\Helper\MessageHelper;
use UnicaenApp\Message\View\Helper\MessageHelperFactory;
13
use UnicaenApp\Service\InstadiaServiceFactory;
14
15
use UnicaenApp\Service\Mailer\MailerService;
use UnicaenApp\Service\Mailer\MailerServiceFactory;
16
use UnicaenApp\ServiceManager\ServiceLocatorAwareInitializer;
17
18
19
20
21
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;
22
use UnicaenApp\View\Helper\HeadLinkFactory;
23
use UnicaenApp\View\Helper\HeadScript;
24
use UnicaenApp\View\Helper\HeadScriptFactory;
25
use UnicaenApp\View\Helper\InlineScript;
26
use UnicaenApp\View\Helper\InlineScriptFactory;
27
use UnicaenApp\View\Helper\InstadiaViewHelper;
28
use UnicaenApp\View\Helper\InstadiaViewHelperFactory;
29
use UnicaenApp\View\Helper\MessageCollectorHelper;
30
use UnicaenApp\View\Helper\MessageCollectorHelperFactory;
31
32
33
34
35
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;
36
use UnicaenApp\View\Helper\Upload\UploaderHelperFactory;
37
use UnicaenApp\View\Helper\UserProfileSelectFactory;
38
use UnicaenApp\View\Helper\UserProfileSelect;
39
40
use UnicaenApp\Controller\ConsoleController;
use UnicaenApp\Controller\ConsoleControllerFactory;
41
42
use UnicaenApp\Service\SQL\RunSQLService;
use UnicaenApp\Service\SQL\RunSQLServiceFactory;
43
use Zend\Mvc\Console\Router\Simple;
44

45
return [
46
47
48
49
50
51
52
    'asset_manager'   => [
        'resolver_configs' => [
            'paths' => [
                __DIR__ . '/../public',
            ],
        ],
    ],
53
54
    'router'          => [
        'routes' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
55
            // Base “route”, which describes the base match needed, the root of the tree
56
            'home'             => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
57
                // The Literal route is for doing exact matching of the URI path
58
                'type'    => 'Literal',
59
                'options' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
60
                    'route'    => '/',
61
                    'defaults' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
62
63
                        'controller' => 'Application\Controller\Index',
                        'action'     => 'index',
64
65
66
                    ],
                ],
            ],
67
            // A propos
68
            'apropos'          => [
69
                'type'     => 'Literal',
70
                'options'  => [
71
                    'route'    => '/apropos',
72
                    'defaults' => [
73
74
                        'controller' => 'UnicaenApp\Controller\Application',
                        'action'     => 'apropos',
75
76
                    ],
                ],
77
                'priority' => 9999,
78
            ],
Bertrand Gauthier's avatar
Bertrand Gauthier committed
79
            // Contact
80
            'contact'          => [
81
                'type'     => 'Literal',
82
                'options'  => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
83
                    'route'    => '/contact',
84
                    'defaults' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
85
86
                        'controller' => 'UnicaenApp\Controller\Application',
                        'action'     => 'contact',
87
88
                    ],
                ],
89
                'priority' => 9999,
90
            ],
Bertrand Gauthier's avatar
Bertrand Gauthier committed
91
            // Plan de navigation
92
            'plan'             => [
93
                'type'     => 'Literal',
94
                'options'  => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
95
                    'route'    => '/plan',
96
                    'defaults' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
97
98
                        'controller' => 'UnicaenApp\Controller\Application',
                        'action'     => 'plan',
99
100
                    ],
                ],
101
                'priority' => 9999,
102
            ],
Bertrand Gauthier's avatar
Bertrand Gauthier committed
103
            // Mentions légales
104
            'mentions-legales' => [
105
                'type'     => 'Literal',
106
                'options'  => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
107
                    'route'    => '/mentions-legales',
108
                    'defaults' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
109
110
                        'controller' => 'UnicaenApp\Controller\Application',
                        'action'     => 'mentions-legales',
111
112
                    ],
                ],
113
                'priority' => 9999,
114
            ],
Bertrand Gauthier's avatar
Bertrand Gauthier committed
115
            // Informatique et libertés
116
            'il'               => [
117
                'type'     => 'Literal',
118
                'options'  => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
119
                    'route'    => '/informatique-et-libertes',
120
                    'defaults' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
121
122
                        'controller' => 'UnicaenApp\Controller\Application',
                        'action'     => 'informatique-et-libertes',
123
124
                    ],
                ],
125
                'priority' => 9999,
126
            ],
127
            // Rafraîchissement de la session
128
            'refresh-session'  => [
129
                'type'    => 'Literal',
130
                'options' => [
131
                    'route'    => '/refresh-session',
132
                    'defaults' => [
133
134
                        'controller' => 'UnicaenApp\Controller\Application',
                        'action'     => 'refresh-session',
135
136
                    ],
                ],
137
            ],
138
139
140
141
142
143
144
145
146
147
148
            //            // Rendu du menu secondaire
            //            'menu-secondaire' => [
            //                'type'          => 'Literal',
            //                'options'       => [
            //                    'route'       => '/menu-secondaire',
            //                    'defaults'    => [
            //                        'controller' => 'UnicaenApp\Controller\Application',
            //                        'action'     => 'menu-secondaire',
            //                    ],
            //                ],
            //            ],
149
            // Test d'envoi de mail par l'appli
150
151
152
153
154
            'test-envoi-mail'  => [
                'type'    => 'Literal',
                'options' => [
                    'route'    => '/test-envoi-mail',
                    'defaults' => [
155
156
157
158
                        'controller' => 'UnicaenApp\Controller\Application',
                        'action'     => 'test-envoi-mail',
                    ],
                ],
159
            ],
160
161
162
163
164
            'maintenance'      => [
                'type'    => 'Literal',
                'options' => [
                    'route'    => '/maintenance',
                    'defaults' => [
165
166
167
168
169
                        'controller' => 'UnicaenApp\Controller\Application',
                        'action'     => 'maintenance',
                    ],
                ],
            ],
170
            'cache'            => [
171
                'type'          => 'Literal',
172
173
                'options'       => [
                    'route'    => '/cache',
174
175
176
177
178
179
                    'defaults' => [
                        'controller' => 'UnicaenApp\Controller\Cache',
                    ],
                ],
                'may_terminate' => false,
                'child_routes'  => [
180
                    'js'  => [
181
                        'type'          => 'Segment',
182
183
                        'options'       => [
                            'route'    => '/js[/:version]',
184
                            'defaults' => [
185
                                'action' => 'js',
186
187
188
189
190
                            ],
                        ],
                        'may_terminate' => true,
                    ],
                    'css' => [
191
                        'type'          => 'Segment',
192
193
                        'options'       => [
                            'route'    => '/css[/:version]',
194
                            'defaults' => [
195
                                'action' => 'css',
196
197
198
199
200
201
                            ],
                        ],
                        'may_terminate' => true,
                    ],
                ],
            ],
202
            'instadia'         => [
203
204
205
206
207
                'type'          => 'Literal',
                'options'       => [
                    'route'    => '/instadia',
                    'defaults' => [
                        '__NAMESPACE__' => 'UnicaenApp\Controller',
208
209
                        'controller'    => 'Instadia',
                        'action'        => 'index',
210
211
212
213
                    ],
                ],
                'may_terminate' => true,
            ],
Bertrand Gauthier's avatar
Bertrand Gauthier committed
214
215
216
217
            // 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
218
            'application'      => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
219
                // The Literal route is for doing exact matching of the URI path
220
221
                'type'          => 'Literal',
                'options'       => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
222
                    'route'    => '/application',
223
                    'defaults' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
224
225
226
                        '__NAMESPACE__' => 'Application\Controller',
                        'controller'    => 'Index',
                        'action'        => 'index',
227
228
                    ],
                ],
Bertrand Gauthier's avatar
Bertrand Gauthier committed
229
230
231
                // 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)
232
233
                'child_routes'  => [
                    'default' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
234
235
                        // A Segment route allows matching any segment of a URI path
                        'type'    => 'Segment',
236
237
238
                        'options' => [
                            'route'       => '/[:controller[/:action]]',
                            'constraints' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
239
240
                                'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
                                'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
241
242
                            ],
                            'defaults'    => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
243
//                                'action' => 'index',
244
245
246
247
248
249
250
                            ],
                        ],
                    ],
                ],
            ],
        ],
    ],
251
252
    'console'         => [
        'router'       => [
253
            'routes' => [
254
                'run-sql-script' => [
255
                    'type'    => Simple::class,
256
                    'options' => [
257
                        'route'    => 'run-sql-script --path= [--logfile=] [--connection=]',
258
259
                        'defaults' => [
                            'controller' => ConsoleController::class,
260
                            'action'     => 'runSQLScript',
261
262
263
                        ],
                    ],
                ],
264
265
                'run-sql-query'  => [
                    'type'    => Simple::class,
266
267
268
269
270
271
272
273
                    'options' => [
                        'route'    => 'run-sql-query --sql= [--logfile=] [--connection=]',
                        'defaults' => [
                            'controller' => ConsoleController::class,
                            'action'     => 'runSQLQuery',
                        ],
                    ],
                ],
274
275
276
277
278
            ],
        ],
        'view_manager' => [
            'display_not_found_reason' => true,
            'display_exceptions'       => true,
279
        ],
280
    ],
281
282
283
284
    'service_manager' => [
        'factories'          => [
            'translator'                  => 'Zend\I18n\Translator\TranslatorServiceFactory',
            'navigation'                  => 'Zend\Navigation\Service\DefaultNavigationFactory',
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
            // 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
301
302
303
304

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

306
307
308
309
            // Gestion des exports XML
            'ViewXmlRenderer'             => 'UnicaenApp\Mvc\Service\ViewXmlRendererFactory',
            'ViewXmlStrategy'             => 'UnicaenApp\Mvc\Service\ViewXmlStrategyFactory',

310
            'MessageCollector' => 'UnicaenApp\Service\MessageCollectorFactory',
311

312
313
314
            'MessageConfig'     => 'UnicaenApp\Message\MessageConfigFactory',
            'MessageRepository' => 'UnicaenApp\Message\MessageRepositoryFactory',
            'MessageService'    => 'UnicaenApp\Message\MessageServiceFactory',
315
316
317
318
319
320
321
322
323
324
325

            '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',

326
327
328
329
            MailerService::class    => MailerServiceFactory::class,
            RunSQLService::class    => RunSQLServiceFactory::class,
            'instadia'              => InstadiaServiceFactory::class,
            HostLocalization::class => HostLocalizationFactory::class,
330
        ],
331
        'shared'             => [
332
333
334
335
336
337
338
339
            'MouchardListenerErrorHandler' => false,
            'MouchardListenerException'    => false,
            'MouchardListenerMessenger'    => false,
            'MouchardFormaterHtml'         => false,
            'MouchardSenderMail'           => false,
            'MouchardSenderException'      => false,
            'MouchardCompleterHttp'        => false,
            'MouchardCompleterMvc'         => false,
340
341
        ],
        'invokables'         => [
342
        ],
343
        'abstract_factories' => [
344
//            'UnicaenApp\Service\Doctrine\MultipleDbAbstractFactory',
345
346
        ],
        'initializers'       => [
347
            ServiceLocatorAwareInitializer::class,
348
349
            'UnicaenApp\Service\EntityManagerAwareInitializer',
        ],
350
351
352
353
        'aliases'            => [
            'MailerService'    => MailerService::class,
            'HostLocalization' => HostLocalization::class,
        ],
354
355
356
    ],
    'form_elements'   => [
        'invokables'   => [
357
            'UploadForm' => 'UnicaenApp\Controller\Plugin\Upload\UploadForm',
358
359
        ],
        'initializers' => [
360
            'UnicaenApp\Service\EntityManagerAwareInitializer',
361
362
        ],
    ],
363
    'hydrators'       => [
364
365
366
367
        'initializers' => [
            'UnicaenApp\Service\EntityManagerAwareInitializer',
        ],
    ],
368
    'view_helpers'    => [
369
        'shared'       => [
370
371
            'formControlGroup' => false,
        ],
372
        'aliases'      => [
373
374
375
376
            'appInfos'          => AppInfos::class,
            'appLink'           => AppLink::class,
            'userProfileSelect' => UserProfileSelect::class,
            'Message'           => MessageHelper::class,
377
            'message'           => MessageHelper::class,
378
379
380
381
382
383
384
385
            'messenger'         => Messenger::class,
            'queryParams'       => QueryParams::class,
            'formControlGroup'  => FormControlGroup::class,
            'headLink'          => HeadLink::class,
            'headScript'        => HeadScript::class,
            'inlineScript'      => InlineScript::class,
            'instadia'          => InstadiaViewHelper::class,
            'messageCollector'  => MessageCollectorHelper::class,
386
            'uploader'          => UploaderHelper::class,
387
388
            'Uploader'          => UploaderHelper::class,
        ],
389
        'factories'    => [
390
391
392
393
394
395
396
397
398
399
400
401
402
            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,
403
404
        ],
        'invokables'   => [
405
406
407
408
409
410
411
412
413
            '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',
414
            'formDateTime'              => Form\View\Helper\FormDateTime::class,
415
416
417
418
419
420
            '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',
421
422
423
            'formAdvancedMultiCheckbox' => 'UnicaenApp\Form\View\Helper\FormAdvancedMultiCheckbox',
            'historique'                => 'UnicaenApp\View\Helper\HistoriqueViewHelper',
            'tabajax'                   => 'UnicaenApp\View\Helper\TabAjax\TabAjaxViewHelper',
424
            'tag'                       => 'UnicaenApp\View\Helper\TagViewHelper',
425
426
        ],
        'initializers' => [
427
            'UnicaenApp\Service\EntityManagerAwareInitializer',
428
            ServiceLocatorAwareInitializer::class,
429
430
431
432
433
        ],
    ],
    'translator'      => [
        'translation_file_patterns' => [
            [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
434
                'type'     => 'phparray',
Bertrand Gauthier's avatar
Bertrand Gauthier committed
435
                'base_dir' => __DIR__ . '/../language',
Bertrand Gauthier's avatar
Bertrand Gauthier committed
436
                'pattern'  => '/%s/Zend_Captcha.php',
437
438
            ],
            [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
439
                'type'     => 'phparray',
Bertrand Gauthier's avatar
Bertrand Gauthier committed
440
                'base_dir' => __DIR__ . '/../language',
Bertrand Gauthier's avatar
Bertrand Gauthier committed
441
                'pattern'  => '/%s/Zend_Validate.php',
442
443
            ],
            [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
444
445
446
                'type'     => 'gettext',
                'base_dir' => __DIR__ . '/../language',
                'pattern'  => '%s.mo',
447
448
449
450
            ],
        ],
    ],
    'controllers'     => [
451
        'invokables'   => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
452
            'UnicaenApp\Controller\Application' => 'UnicaenApp\Controller\ApplicationController',
453
        ],
454
455
456
        'initializers' => [
            'UnicaenApp\Service\EntityManagerAwareInitializer',
        ],
457
458
        'factories'    => [
            'UnicaenApp\Controller\Cache'    => CacheControllerFactory::class,
459
            'UnicaenApp\Controller\Instadia' => InstadiaControllerFactory::class,
460
461
            ConsoleController::class         => ConsoleControllerFactory::class,
        ],
462
    ],
463

464
    'doctrine' => [
465
466
467
468
469
470
471
472
        'driver' => [
            'orm_app_driver' => [
                'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
                'cache' => 'array',
                'paths' => [
                    __DIR__ . '/../src/UnicaenApp/Entity/Db',
                ],
            ],
473
            'orm_default'    => [
474
475
476
477
478
479
480
                'class'   => 'Doctrine\ORM\Mapping\Driver\DriverChain',
                'drivers' => [
                    'UnicaenApp\Entity\Db' => 'orm_app_driver',
                ],
            ],
        ],
    ],
481

482
    'view_manager' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
483
        // RouteNotFoundStrategy configuration
484
        'display_not_found_reason' => false, // display 404 reason in template
Bertrand Gauthier's avatar
Bertrand Gauthier committed
485
486
        'not_found_template'       => 'error/404', // e.g. '404'
        // ExceptionStrategy configuration
487
        'display_exceptions'       => false,
Bertrand Gauthier's avatar
Bertrand Gauthier committed
488
489
490
491
492
        'exception_template'       => 'error/index',
        // Doctype with which to seed the Doctype helper
        'doctype'                  => 'HTML5',
        // TemplateMapResolver configuration
        // template/path pairs
493
494
495
496
497
498
499
500
501
502
        '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
503
        // TemplatePathStack configuration
504
        'template_path_stack'      => [
505
            __DIR__ . '/../view',
506
        ],
Bertrand Gauthier's avatar
Bertrand Gauthier committed
507
        // Layout template name
508
        'layout'                   => 'layout/layout', // e.g., 'layout/layout'
Bertrand Gauthier's avatar
Bertrand Gauthier committed
509
        // Additional strategies to attach
510
        'strategies'               => [
511
            'ViewJsonStrategy', // register JSON renderer strategy
Laurent Lécluse's avatar
Laurent Lécluse committed
512
            'ViewCsvStrategy', // register CSV renderer strategy
513
            //            'ViewXmlStrategy', // register XML renderer strategy
514
515
516
            //            'ViewFeedStrategy', // register Feed renderer strategy
        ],
    ],
Bertrand Gauthier's avatar
Bertrand Gauthier committed
517
    // All navigation-related configuration is collected in the 'navigation' key
518
    'navigation'   => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
519
        // The DefaultNavigationFactory we configured uses 'default' as the sitemap key
520
        'default' => [
Bertrand Gauthier's avatar
Bertrand Gauthier committed
521
            // And finally, here is where we define our page hierarchy
522
523
524
525
526
527
528
            'home' => [
                'label' => _("Accueil"),
                'title' => _("Page d'accueil de l'application"),
                'route' => 'home',
                'order' => -100, // make sure home is the first page
                'pages' => [
                    'etab'                     => [
529
530
                        'label'    => _("Université de Caen Normandie"),
                        'title'    => _("Page d'accueil du site de l'Université de Caen Normandie"),
531
532
533
534
535
                        '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)
536
                        'order'    => 1000,
537
538
                    ],
                    'apropos'                  => [
539
540
541
                        'label'    => _("À propos"),
                        'title'    => _("À propos de cette application"),
                        'route'    => 'apropos',
542
                        'class'    => 'apropos',
543
544
545
546
                        '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',
547
                        'order'    => 1001,
548
549
                    ],
                    'contact'                  => [
550
551
552
                        'label'    => _("Contact"),
                        'title'    => _("Contact concernant l'application"),
                        'route'    => 'contact',
553
                        'class'    => 'contact',
554
555
556
557
                        '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',
558
                        'order'    => 1002,
559
560
                    ],
                    'plan'                     => [
561
562
563
                        'label'    => _("Plan de navigation"),
                        'title'    => _("Plan de navigation au sein de l'application"),
                        'route'    => 'plan',
564
                        'class'    => 'plan',
565
566
567
568
                        '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',
569
                        'order'    => 1003,
570
571
                    ],
                    'mentions-legales'         => [
572
573
                        'label'    => _("Mentions légales"),
                        'title'    => _("Mentions légales"),
574
                        'uri'      => 'http://www.unicaen.fr/acces-direct/mentions-legales/',
575
                        'class'    => 'ml',
576
577
578
579
                        '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',
580
                        'order'    => 1004,
581
582
                    ],
                    'informatique-et-libertes' => [
583
584
585
                        'label'    => _("Vie privée"),
                        'title'    => _("Vie privée"),
                        'uri'      => 'http://www.unicaen.fr/vie-privee/',
586
                        'class'    => 'il',
587
588
589
590
                        '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',
591
                        'order'    => 1005,
592
593
594
595
596
                    ],
                ],
            ],
        ],
    ],
597

598
    'public_files' => [
599
        'head_scripts'          => [
600
601
            '010_jquery'   => '/unicaen/app/vendor/jquery-1.11.3.min.js',
            '020_jqueryui' => '/unicaen/app/vendor/jquery-ui-1.11.4/jquery-ui.min.js',
602
        ],
603
        'inline_scripts'        => [
604
            '010_bootstrap'   => '/unicaen/app/vendor/bootstrap-3.3.5/js/bootstrap.min.js',
605
            '020_app'         => '/js/app.js',
606
607
            '030_util'        => '/unicaen/app/js/util.js',
            '040_unicaen'     => '/unicaen/app/js/unicaen.js',
608
            '050_jquery_form' => '/unicaen/app/vendor/jquery.form-3.51.js' // pour l'uploader Unicaen uniquement!!,
609
        ],
610
        'stylesheets'           => [
611
612
613
614
615
            '010_jquery-ui'           => '/unicaen/app/vendor/jquery-ui-1.11.4/jquery-ui.min.css',
            '020_jquery-ui-structure' => '/unicaen/app/vendor/jquery-ui-1.11.4/jquery-ui.structure.min.css',
            '030_jquery-ui-theme'     => '/unicaen/app/vendor/jquery-ui-1.11.4/jquery-ui.theme.min.css',
            '040_bootstrap'           => '/unicaen/app/vendor/bootstrap-3.3.5/css/bootstrap.min.css',
            '050_bootstrap-theme'     => '/unicaen/app/vendor/bootstrap-3.3.5/css/bootstrap-theme.min.css',
616
            '060_unicaen'             => '/unicaen/app/css/unicaen.css',
617
            '070_app'                 => '/css/app.css',
618
        ],
619
        'printable_stylesheets' => [
620
        ],
621
        'cache_enabled'         => false,
622
    ],
623

624
    'bjyauthorize' => [
625
626
        'guards' => [
            'BjyAuthorize\Guard\Controller' => [
627
628
629
630
631
                [
                    'controller' => 'UnicaenApp\Controller\Application',
                    'action'     => ['maintenance'],
                    'roles'      => [],
                ],
632
633
                [
                    'controller' => 'UnicaenApp\Controller\Cache',
634
                    'action'     => ['js', 'css', 'printable-css'],
635
                    'roles'      => [],
636
                ],
637
638
639
640
641
                [
                    'controller' => 'UnicaenApp\Controller\Instadia',
                    'action'     => ['index'],
                    'roles'      => [],
                ],
642
643
            ],
        ],
644
    ],
645
];