File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
Original file line number Diff line number Diff line change @@ -61,7 +61,9 @@ because that will be explained in the next section)::
61
61
*/
62
62
public function indexAction()
63
63
{
64
- return $this->render('default/index.html.twig');
64
+ return $this->render('default/index.html.twig', [
65
+ // ...
66
+ ]);
65
67
}
66
68
}
67
69
@@ -79,8 +81,8 @@ just call other parts of the application to get or generate the needed
79
81
information and then they render a template to show the results to the user.
80
82
81
83
In this example, the ``index `` action is practically empty because it doesn't
82
- need to call any other method. The action just renders a template with the
83
- * Homepage * content .
84
+ need to call any other method. The action just renders a template to welcome
85
+ you to Symfony .
84
86
85
87
Routing
86
88
~~~~~~~
@@ -103,7 +105,9 @@ at the three lines of code above the ``indexAction()`` method::
103
105
*/
104
106
public function indexAction()
105
107
{
106
- return $this->render('default/index.html.twig');
108
+ return $this->render('default/index.html.twig', [
109
+ // ...
110
+ ]);
107
111
}
108
112
}
109
113
@@ -136,7 +140,9 @@ Templates
136
140
137
141
The only content of the ``index `` action is this PHP instruction::
138
142
139
- return $this->render('default/index.html.twig');
143
+ return $this->render('default/index.html.twig', [
144
+ // ...
145
+ ]);
140
146
141
147
The ``$this->render() `` method is a convenient shortcut to render a template.
142
148
Symfony provides some useful shortcuts to any controller extending from
You can’t perform that action at this time.
0 commit comments