X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=module%2FGalerie%2Fconfig%2Fmodule.config.php;h=498872820f411a073f1c1f4e0cfe5e5d0be304da;hb=e7bf475c13472113aca27f2532cb55572279185f;hp=18cffd36da9e63e1f2c77019324508c3f93f2336;hpb=f8c4b0fcb2cc411e29372eb88236a37807866f6e;p=zf2.biz%2Fgalerie.git diff --git a/module/Galerie/config/module.config.php b/module/Galerie/config/module.config.php index 18cffd3..4988728 100644 --- a/module/Galerie/config/module.config.php +++ b/module/Galerie/config/module.config.php @@ -27,7 +27,7 @@ return array( 'galerie' => array( 'type' => 'Literal', 'options' => array( - 'route' => '/galerie', + 'route' => '/galeries', 'defaults' => array( '__NAMESPACE__' => 'Galerie\Controller', 'controller' => 'Index', @@ -36,6 +36,83 @@ return array( ), 'verb' => 'get', 'may_terminate' => true, + 'child_routes' => array( + + 'add' => array( + 'type' => 'Literal', + 'options' => array( + 'route' => '/ajout', + 'defaults' => array( + 'action' => 'edit', + ), + ), + 'verb' => 'get,post', + ), + 'edit' => array( + 'type' => 'Segment', + 'options' => array( + 'route' => '/editer/:id', + 'constraints' => array( + 'id' => '[1-9][0-9]*', + ), + 'defaults' => array( + 'action' => 'edit', + ), + ), + 'verb' => 'get,post', + ), + 'del' => array( + 'type' => 'Segment', + 'options' => array( + 'route' => '/supprimer/:id', + 'constraints' => array( + 'id' => '[1-9][0-9]*', + ), + 'defaults' => array( + 'action' => 'del', + ), + ), + 'verb' => 'get,post', + ), + 'view' => array( + 'type' => 'Segment', + 'options' => array( + 'route' => '/voir/:id', + 'constraints' => array( + 'id' => '[1-9][0-9]*', + ), + 'defaults' => array( + 'action' => 'view', + ), + ), + ), + 'add_or_edit' => array( + 'type' => 'Segment', + 'options' => array( + 'route' => '/ajouter_editer/[:id]', + 'constraints' => array( + 'id' => '[1-9][0-9]*', + ), + 'defaults' => array( + 'action' => 'edit', + 'id' => null, + ), + ), + 'verb' => 'get,post', + ), + 'default' => array( + 'type' => 'Segment', + 'options' => array( + 'route' => '/[:controller[/:action]]', + 'constraints' => array( + 'controller' => '[a-zA-Z][a-zA-Z0-9_-]*', + 'action' => '[a-zA-Z][a-zA-Z0-9_-]*', + ), + 'defaults' => array( + ), + ), + ), + ), ), ), ),