@@ -8,7 +8,7 @@ Usually, when you need to create a page, you need to create a controller
8
8
and render a template from within that controller. But if you're rendering
9
9
a simple template that doesn't need any data passed into it, you can avoid
10
10
creating the controller entirely, by using the built-in
11
- `` Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction ` `
11
+ :class: ` Symfony\\ Bundle\\ FrameworkBundle\\ Controller\\ TemplateController `
12
12
controller.
13
13
14
14
For example, suppose you want to render a ``static/privacy.html.twig ``
@@ -22,7 +22,7 @@ can do this without creating a controller:
22
22
# config/routes.yaml
23
23
acme_privacy :
24
24
path : /privacy
25
- controller : Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction
25
+ controller : Symfony\Bundle\FrameworkBundle\Controller\TemplateController
26
26
defaults :
27
27
template : static/privacy.html.twig
28
28
@@ -35,7 +35,7 @@ can do this without creating a controller:
35
35
xsi : schemaLocation =" http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd" >
36
36
37
37
<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 >
39
39
<default key =" template" >static/privacy.html.twig</default >
40
40
</route >
41
41
</routes >
@@ -48,7 +48,7 @@ can do this without creating a controller:
48
48
49
49
$routes = new RouteCollection();
50
50
$routes->add('acme_privacy', new Route('/privacy', array(
51
- '_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction ',
51
+ '_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\TemplateController',
52
52
'template' => 'static/privacy.html.twig',
53
53
)));
54
54
@@ -83,7 +83,7 @@ other variables in your route, you can control exactly how your page is cached:
83
83
# config/routes.yaml
84
84
acme_privacy :
85
85
path : /privacy
86
- controller : Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction
86
+ controller : Symfony\Bundle\FrameworkBundle\Controller\TemplateController
87
87
defaults :
88
88
template : ' static/privacy.html.twig'
89
89
maxAge : 86400
@@ -98,7 +98,7 @@ other variables in your route, you can control exactly how your page is cached:
98
98
xsi : schemaLocation =" http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd" >
99
99
100
100
<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 >
102
102
<default key =" template" >static/privacy.html.twig</default >
103
103
<default key =" maxAge" >86400</default >
104
104
<default key =" sharedAge" >86400</default >
@@ -113,7 +113,7 @@ other variables in your route, you can control exactly how your page is cached:
113
113
114
114
$routes = new RouteCollection();
115
115
$routes->add('acme_privacy', new Route('/privacy', array(
116
- '_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction ',
116
+ '_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\TemplateController',
117
117
'template' => 'static/privacy.html.twig',
118
118
'maxAge' => 86400,
119
119
'sharedAge' => 86400,
0 commit comments