File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed 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)::
6161 */
6262 public function indexAction()
6363 {
64- return $this->render('default/index.html.twig');
64+ return $this->render('default/index.html.twig', [
65+ // ...
66+ ]);
6567 }
6668 }
6769
@@ -79,8 +81,8 @@ just call other parts of the application to get or generate the needed
7981information and then they render a template to show the results to the user.
8082
8183In 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 .
8486
8587Routing
8688~~~~~~~
@@ -103,7 +105,9 @@ at the three lines of code above the ``indexAction()`` method::
103105 */
104106 public function indexAction()
105107 {
106- return $this->render('default/index.html.twig');
108+ return $this->render('default/index.html.twig', [
109+ // ...
110+ ]);
107111 }
108112 }
109113
@@ -136,7 +140,9 @@ Templates
136140
137141The only content of the ``index `` action is this PHP instruction::
138142
139- return $this->render('default/index.html.twig');
143+ return $this->render('default/index.html.twig', [
144+ // ...
145+ ]);
140146
141147The ``$this->render() `` method is a convenient shortcut to render a template.
142148Symfony provides some useful shortcuts to any controller extending from
You can’t perform that action at this time.
0 commit comments