@@ -14,7 +14,7 @@ any action of any controller is the creation of a ``Response`` object which
1414Symfony uses to generate the HTML content returned to the user.
1515
1616So far, all the actions shown in this tutorial used the ``$this->render() ``
17- shortcut to return a rendered response as result. If case you need it, you can
17+ shortcut to return a rendered response as result. In case you need it, you can
1818also create a raw ``Response `` object to return any text content::
1919
2020 // src/AppBundle/Controller/DefaultController.php
@@ -125,7 +125,7 @@ its default value::
125125 }
126126
127127Obviously, when you support several request formats, you have to provide a
128- tempalte for each of the supported formats. In this case, you should create a
128+ template for each of the supported formats. In this case, you should create a
129129new ``hello.xml.twig `` template:
130130
131131.. code-block :: xml+php
@@ -144,7 +144,7 @@ in your browser.
144144
145145That's all there is to it. For standard formats, Symfony will also
146146automatically choose the best ``Content-Type `` header for the response. To
147- restrict the the formats supported by a given action, use the ``requirements ``
147+ restrict the formats supported by a given action, use the ``requirements ``
148148option of the ``@Route() `` annotation::
149149
150150 // src/AppBundle/Controller/DefaultController.php
@@ -190,9 +190,8 @@ method::
190190 }
191191 }
192192
193- The ``redirectToRoute() `` is similar to the ``path() `` function used in the
194- templates. It takes the route name and an array of parameters as arguments and
195- returns the associated friendly URL.
193+ The ``redirectToRoute() `` method takes as arguments the route name and an optional
194+ array of parameters and redirects the user to the URL generated with those arguments.
196195
197196You can also internally forward the action to another action of the same or
198197different controller using the ``forward() `` method::
@@ -226,6 +225,7 @@ use in your controllers::
226225 */
227226 public function indexAction()
228227 {
228+ // ...
229229 throw $this->createNotFoundException();
230230 }
231231 }
@@ -241,6 +241,7 @@ Symfony will transform it into a proper ``500`` error page::
241241 */
242242 public function indexAction()
243243 {
244+ // ...
244245 throw new \Exception('Something went horribly wrong!');
245246 }
246247 }
@@ -249,7 +250,7 @@ Getting Information from the Request
249250------------------------------------
250251
251252Sometimes your controllers need to access the information related to the user
252- request, such as his/her preferred language, IP address or the URL query parameters.
253+ request, such as their preferred language, IP address or the URL query parameters.
253254To get access to this information, add a new argument of type ``Request `` to the
254255action. The name of this new argument doesn't matter, but it must be preceded
255256by the ``Request `` type in order to work (don't forget to add the new ``use ``
@@ -346,4 +347,4 @@ That's all there is to it, and I'm not even sure you'll have spent the full
34634710 minutes. You were briefly introduced to bundles in the first part, and all the
347348features you've learned about so far are part of the core framework bundle.
348349But thanks to bundles, everything in Symfony can be extended or replaced.
349- That's the topic of the :doc: `next part of this tutorial<the_architecture> `.
350+ That's the topic of the :doc: `next part of this tutorial <the_architecture >`.
0 commit comments