RĂ©alisation de galerie/index avec Ajax/Datatable
[zf2.biz/galerie.git] / module / Galerie / config / module.config.php
1 <?php
2
3 return array(
4     'controllers' => array(
5         'invokables' => array(
6             'Galerie\Controller\Index' =>
7                 'Galerie\Controller\IndexController'
8         ),
9     ),
10     'view_manager' => array(
11         'template_map' => array( 
12             'galerie/index/index' =>
13                         __DIR__ . '/../view/galerie/index/index.phtml', 
14             'galerie/index/edit' =>
15                         __DIR__ . '/../view/galerie/index/edit.phtml', 
16             'galerie/index/del' =>
17                         __DIR__ . '/../view/galerie/index/del.phtml', 
18             'galerie/index/view' =>
19                         __DIR__ . '/../view/galerie/index/view.phtml', 
20         ), 
21         'template_path_stack' => array(
22             'galerie' => __DIR__ . '/../view',
23         ),
24         'strategies' => array(
25             'ViewJsonStrategy',
26         ),
27     ),
28     'router' => array(
29         'routes' => array(
30             'galerie' => array(
31                 'type'    => 'Literal',
32                 'options' => array(
33                     'route'    => '/galeries',
34                     'defaults' => array(
35                         '__NAMESPACE__' => 'Galerie\Controller',
36                         'controller'    => 'Index',
37                         'action'        => 'index',
38                     ),
39                 ),
40                 'verb' => 'get',
41                 'may_terminate' => true,
42                 'child_routes' => array(
43                     'add' => array(
44                         'type'    => 'Literal',
45                         'options' => array(
46                             'route'    => '/ajout',
47                             'defaults' => array(
48                                 'action' => 'edit',
49                             ),
50                         ),
51                         'verb' => 'get,post',
52                     ),
53                     'edit' => array(
54                         'type'    => 'Segment',
55                         'options' => array(
56                             'route'    => '/editer/:id',
57                             'constraints' => array(
58                                 'id' => '[1-9][0-9]*',
59                             ),
60                             'defaults' => array(
61                                 'action' => 'edit',
62                             ),
63                         ),
64                         'verb' => 'get,post',
65                     ),
66                     'del' => array(
67                         'type'    => 'Segment',
68                         'options' => array(
69                             'route'    => '/supprimer/:id',
70                             'constraints' => array(
71                                 'id' => '[1-9][0-9]*',
72                             ),
73                             'defaults' => array(
74                                 'action' => 'del',
75                             ),
76                         ),
77                         'verb' => 'get,post',
78                     ),
79                     'view' => array(
80                         'type'    => 'Segment',
81                         'options' => array(
82                             'route'    => '/voir/:id',
83                             'constraints' => array(
84                                 'id' => '[1-9][0-9]*',
85                             ),
86                             'defaults' => array(
87                                 'action' => 'view',
88                             ),
89                         ),
90                     ),
91                     'add_or_edit' => array(
92                         'type'    => 'Segment',
93                         'options' => array(
94                             'route'    => '/ajouter_editer/[:id]',
95                             'constraints' => array(
96                                 'id' => '[1-9][0-9]*',
97                             ),
98                             'defaults' => array(
99                                 'action' => 'edit',
100                                 'id' => null,
101                             ),
102                         ),
103                         'verb' => 'get,post',
104                     ),
105                     'list' => array(
106                         'type'    => 'Literal',
107                         'options' => array(
108                             'route'    => '/liste',
109                             'defaults' => array(
110                                 'action' => 'list',
111                             ),
112                         ),
113                         'verb' => 'get',
114                     ),/*
115                     'default' => array(
116                         'type'    => 'Segment',
117                         'options' => array(
118                             'route'    => '/[:controller[/:action]]',
119                             'constraints' => array(
120                                 'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
121                                 'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
122                             ),
123                             'defaults' => array(
124                             ),
125                         ),
126                     ),*/
127                 ),
128             ),
129         ),
130     ),
131     'service_manager' => array( 
132         'factories' => array( 
133             'translator' => 'Zend\I18n\Translator\TranslatorServiceFactory', 
134         ), 
135     ), 
136     'translator' => array( 
137         'locale' => 'fr_FR', 
138         'translation_file_patterns' => array( 
139             array( 
140                 'type'     => 'gettext', 
141                 'base_dir' => __DIR__ . '/../language', 
142                 'pattern'  => '%s.mo', 
143                 'text_domain'  => 'galerie', 
144             ), 
145             array( 
146                 'type'     => 'phpArray', 
147                 'base_dir' => __DIR__ . '/../language/val', 
148                 'pattern'  => 'Zend_Validate_%s.php', 
149                 'text_domain'  => 'val', 
150             ), 
151         ), 
152     ), 
153 );