bastien 13 years ago
parent
commit
343d9ddcfa

+ 7 - 0
src/Muzich/CoreBundle/Controller/InfoController.php View File

@@ -4,6 +4,8 @@ namespace Muzich\CoreBundle\Controller;
4 4
 
5 5
 use Muzich\CoreBundle\lib\Controller;
6 6
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
7
+use Symfony\Component\HttpFoundation\Response;
8
+use Symfony\Component\HttpKernel\Exception\HttpException;
7 9
 
8 10
 class InfoController extends Controller
9 11
 {
@@ -36,4 +38,9 @@ class InfoController extends Controller
36 38
     return array();
37 39
   }
38 40
   
41
+  public function teapotAction()
42
+  {
43
+    throw new HttpException(418, "I'm a teapot !");
44
+  }
45
+  
39 46
 }

+ 7 - 1
src/Muzich/CoreBundle/Resources/config/routing.yml View File

@@ -132,4 +132,10 @@ ajax_element_proposed_tags_accept:
132 132
   
133 133
 ajax_element_proposed_tags_refuse:
134 134
   pattern: /ajax/element/proposed/tags/refuses/{element_id}/{token}
135
-  defaults: { _controller: MuzichCoreBundle:Element:proposedTagsRefuse }
135
+  defaults: { _controller: MuzichCoreBundle:Element:proposedTagsRefuse }
136
+  
137
+## lol
138
+
139
+teapot:
140
+  pattern: /what/are/you
141
+  defaults: { _controller: MuzichCoreBundle:Info:teapot }