From 816d0e5496001e17fde7ded781d33a634434ba01 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20CHAZALLET?= Date: Fri, 2 Nov 2012 14:14:53 +0100 Subject: [PATCH] =?utf8?q?module=20galerie:=20Rajout=20des=20routes=20termin?= =?utf8?q?=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- module/Galerie/config/module.config.php | 77 +++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/module/Galerie/config/module.config.php b/module/Galerie/config/module.config.php index c8d1b40..2b3bc66 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' => '/edition/:id', + 'constraints' => array( + 'id' => '[1-9][0-9]*', + ), + 'defaults' => array( + 'action' => 'edit', + ), + ), + 'verb' => 'get,post', + ), + 'del' => array( + 'type' => 'Segment', + 'options' => array( + 'route' => '/suppression/: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( + ), + ), + ), + ), ), ), ), -- 1.7.10.4