@@ -7,7 +7,7 @@ Controller
7
7
A controller is a PHP function you create that reads information from the Symfony's
8
8
``Request `` object and creates and returns a ``Response `` object. The response could
9
9
be an HTML page, JSON, XML, a file download, a redirect, a 404 error or anything
10
- else you can dream up. The controller contains whatever arbitrary logic
10
+ else you can dream up. The controller executes whatever arbitrary logic
11
11
*your application * needs to render the content of a page.
12
12
13
13
See how simple this is by looking at a Symfony controller in action.
@@ -174,10 +174,10 @@ and ``redirect()`` methods::
174
174
175
175
// do a permanent - 301 redirect
176
176
return $this->redirectToRoute('homepage', array(), 301);
177
-
177
+
178
178
// redirect to a route with parameters
179
179
return $this->redirectToRoute('blog_show', array('slug' => 'my-page'));
180
-
180
+
181
181
// redirect externally
182
182
return $this->redirect('http://symfony.com/doc');
183
183
}
@@ -419,7 +419,7 @@ read any flash messages from the session:
419
419
420
420
.. code-block :: html+twig
421
421
422
- {# app/Resources/views. base.html.twig #}
422
+ {# app/Resources/views/ base.html.twig #}
423
423
{% for flash_message in app.session.flashBag.get('notice') %}
424
424
<div class="flash-notice">
425
425
{{ flash_message }}
@@ -541,7 +541,7 @@ this gives two things:
541
541
542
542
A) Shortcut methods (like ``render() `` and ``redirectToRoute ``);
543
543
544
- B) Access to *all * of the useful objects (services) in the system via the
544
+ B) Access to *all * of the useful objects (services) in the system via the
545
545
:ref: `get() <controller-accessing-services >` method.
546
546
547
547
In other chapters, you'll learn how to use specific services from inside your controller
0 commit comments