aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Acme/DemoBundle/Controller/DemoController.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-31 15:36:04 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-31 15:36:04 +0100
commit1990517b2263a080946853ed697a6d687262ae80 (patch)
tree8f676a051a25c65bf2130235e6b30e3f53030154 /src/Acme/DemoBundle/Controller/DemoController.php
parentc3235553ddc2bb5965f6fe00e750cfe4aac9ccdf (diff)
downloadwallabag-1990517b2263a080946853ed697a6d687262ae80.tar.gz
wallabag-1990517b2263a080946853ed697a6d687262ae80.tar.zst
wallabag-1990517b2263a080946853ed697a6d687262ae80.zip
remove Acme and AppBundle
Diffstat (limited to 'src/Acme/DemoBundle/Controller/DemoController.php')
-rw-r--r--src/Acme/DemoBundle/Controller/DemoController.php56
1 files changed, 0 insertions, 56 deletions
diff --git a/src/Acme/DemoBundle/Controller/DemoController.php b/src/Acme/DemoBundle/Controller/DemoController.php
deleted file mode 100644
index a99de891..00000000
--- a/src/Acme/DemoBundle/Controller/DemoController.php
+++ /dev/null
@@ -1,56 +0,0 @@
1<?php
2
3namespace Acme\DemoBundle\Controller;
4
5use Symfony\Bundle\FrameworkBundle\Controller\Controller;
6use Symfony\Component\HttpFoundation\RedirectResponse;
7use Symfony\Component\HttpFoundation\Request;
8use Acme\DemoBundle\Form\ContactType;
9
10// these import the "@Route" and "@Template" annotations
11use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
12use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
13
14class DemoController extends Controller
15{
16 /**
17 * @Route("/", name="_demo")
18 * @Template()
19 */
20 public function indexAction()
21 {
22 return array();
23 }
24
25 /**
26 * @Route("/hello/{name}", name="_demo_hello")
27 * @Template()
28 */
29 public function helloAction($name)
30 {
31 return array('name' => $name);
32 }
33
34 /**
35 * @Route("/contact", name="_demo_contact")
36 * @Template()
37 */
38 public function contactAction(Request $request)
39 {
40 $form = $this->createForm(new ContactType());
41 $form->handleRequest($request);
42
43 if ($form->isValid()) {
44 $mailer = $this->get('mailer');
45
46 // .. setup a message and send it
47 // http://symfony.com/doc/current/cookbook/email.html
48
49 $request->getSession()->getFlashBag()->set('notice', 'Message sent!');
50
51 return new RedirectResponse($this->generateUrl('_demo'));
52 }
53
54 return array('form' => $form->createView());
55 }
56}