Rajout des aides de vue et d'action
[zf2.biz/galerie.git] / module / Galerie / config / module.config.php
index 2b3bc66..5c06d9c 100644 (file)
@@ -4,7 +4,13 @@ return array(
     'controllers' => array(
         'invokables' => array(
             'Galerie\Controller\Index' =>
-                'Galerie\Controller\IndexController'
+                'Galerie\Controller\IndexController',
+        ),
+    ),
+    'controller_plugins' => array(
+        'invokables' => array(
+            'MessageGetter' =>
+                'Custom\Mvc\Controller\Plugin\MessageGetter',
         ),
     ),
     'view_manager' => array(
@@ -21,6 +27,9 @@ return array(
         'template_path_stack' => array(
             'galerie' => __DIR__ . '/../view',
         ),
+        'strategies' => array(
+            'ViewJsonStrategy',
+        ),
     ),
     'router' => array(
         'routes' => array(
@@ -37,7 +46,6 @@ return array(
                 'verb' => 'get',
                 'may_terminate' => true,
                 'child_routes' => array(
-
                     'add' => array(
                         'type'    => 'Literal',
                         'options' => array(
@@ -51,7 +59,7 @@ return array(
                     'edit' => array(
                         'type'    => 'Segment',
                         'options' => array(
-                            'route'    => '/edition/:id',
+                            'route'    => '/editer/:id',
                             'constraints' => array(
                                 'id' => '[1-9][0-9]*',
                             ),
@@ -64,7 +72,7 @@ return array(
                     'del' => array(
                         'type'    => 'Segment',
                         'options' => array(
-                            'route'    => '/suppression/:id',
+                            'route'    => '/supprimer/:id',
                             'constraints' => array(
                                 'id' => '[1-9][0-9]*',
                             ),
@@ -100,6 +108,16 @@ return array(
                         ),
                         'verb' => 'get,post',
                     ),
+                    'list' => array(
+                        'type'    => 'Literal',
+                        'options' => array(
+                            'route'    => '/liste',
+                            'defaults' => array(
+                                'action' => 'list',
+                            ),
+                        ),
+                        'verb' => 'get',
+                    ),/*
                     'default' => array(
                         'type'    => 'Segment',
                         'options' => array(
@@ -111,9 +129,31 @@ return array(
                             'defaults' => array(
                             ),
                         ),
-                    ),
+                    ),*/
                 ),
             ),
         ),
     ),
+    'service_manager' => array( 
+        'factories' => array( 
+            'translator' => 'Zend\I18n\Translator\TranslatorServiceFactory', 
+        ), 
+    ), 
+    'translator' => array( 
+        'locale' => 'fr_FR', 
+        'translation_file_patterns' => array( 
+            array( 
+                'type'     => 'gettext', 
+                'base_dir' => __DIR__ . '/../language', 
+                'pattern'  => '%s.mo', 
+                'text_domain'  => 'galerie', 
+            ), 
+            array( 
+                'type'     => 'phpArray', 
+                'base_dir' => __DIR__ . '/../language/val', 
+                'pattern'  => 'Zend_Validate_%s.php', 
+                'text_domain'  => 'val', 
+            ), 
+        ), 
+    ), 
 );