@@ -8,7 +8,7 @@ Usually, when you need to create a page, you need to create a controller
88and render a template from within that controller. But if you're rendering
99a simple template that doesn't need any data passed into it, you can avoid
1010creating the controller entirely, by using the built-in
11- `` Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction ` `
11+ :class: ` Symfony\\ Bundle\\ FrameworkBundle\\ Controller\\ TemplateController `
1212controller.
1313
1414For example, suppose you want to render a ``static/privacy.html.twig ``
@@ -22,7 +22,7 @@ can do this without creating a controller:
2222 # config/routes.yaml
2323 acme_privacy :
2424 path : /privacy
25- controller : Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction
25+ controller : Symfony\Bundle\FrameworkBundle\Controller\TemplateController
2626 defaults :
2727 template : static/privacy.html.twig
2828
@@ -35,7 +35,7 @@ can do this without creating a controller:
3535 xsi : schemaLocation =" http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd" >
3636
3737 <route id =" acme_privacy" path =" /privacy" >
38- <default key =" _controller" >Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction </default >
38+ <default key =" _controller" >Symfony\Bundle\FrameworkBundle\Controller\TemplateController</default >
3939 <default key =" template" >static/privacy.html.twig</default >
4040 </route >
4141 </routes >
@@ -48,7 +48,7 @@ can do this without creating a controller:
4848
4949 $routes = new RouteCollection();
5050 $routes->add('acme_privacy', new Route('/privacy', array(
51- '_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction ',
51+ '_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\TemplateController',
5252 'template' => 'static/privacy.html.twig',
5353 )));
5454
@@ -83,7 +83,7 @@ other variables in your route, you can control exactly how your page is cached:
8383 # config/routes.yaml
8484 acme_privacy :
8585 path : /privacy
86- controller : Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction
86+ controller : Symfony\Bundle\FrameworkBundle\Controller\TemplateController
8787 defaults :
8888 template : ' static/privacy.html.twig'
8989 maxAge : 86400
@@ -98,7 +98,7 @@ other variables in your route, you can control exactly how your page is cached:
9898 xsi : schemaLocation =" http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd" >
9999
100100 <route id =" acme_privacy" path =" /privacy" >
101- <default key =" _controller" >Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction </default >
101+ <default key =" _controller" >Symfony\Bundle\FrameworkBundle\Controller\TemplateController</default >
102102 <default key =" template" >static/privacy.html.twig</default >
103103 <default key =" maxAge" >86400</default >
104104 <default key =" sharedAge" >86400</default >
@@ -113,7 +113,7 @@ other variables in your route, you can control exactly how your page is cached:
113113
114114 $routes = new RouteCollection();
115115 $routes->add('acme_privacy', new Route('/privacy', array(
116- '_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction ',
116+ '_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\TemplateController',
117117 'template' => 'static/privacy.html.twig',
118118 'maxAge' => 86400,
119119 'sharedAge' => 86400,
0 commit comments