X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=module%2FGalerie%2Fconfig%2Fmodule.config.php;h=498872820f411a073f1c1f4e0cfe5e5d0be304da;hb=e7bf475c13472113aca27f2532cb55572279185f;hp=c8d1b4091c50c8d3b585e69eca2a52fd5a74d662;hpb=39d476c1cb28352c6170843945a1ff7221db5716;p=zf2.biz%2Fgalerie.git diff --git a/module/Galerie/config/module.config.php b/module/Galerie/config/module.config.php index c8d1b40..4988728 100644 --- a/module/Galerie/config/module.config.php +++ b/module/Galerie/config/module.config.php @@ -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( + ), + ), + ), + ), ), ), ),