Skip to content

Commit 917be05

Browse files
committed
Fixed code examples in quick_tour
1 parent 66646ce commit 917be05

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

quick_tour/the_controller.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ in Symfony2 is straightforward. Tweak the route by adding a default value of
1717
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
1818
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
1919

20+
// ...
21+
2022
/**
2123
* @Route("/hello/{name}", defaults={"_format"="xml"}, name="_demo_hello")
2224
* @Template()
@@ -45,6 +47,8 @@ placeholder in the route pattern instead::
4547
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
4648
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
4749

50+
// ...
51+
4852
/**
4953
* @Route("/hello/{name}.{_format}", defaults={"_format"="html"}, requirements={"_format"="html|xml|json"}, name="_demo_hello")
5054
* @Template()
@@ -80,7 +84,7 @@ object from that sub-request::
8084

8185
$response = $this->forward('AcmeDemoBundle:Hello:fancy', array('name' => $name, 'color' => 'green'));
8286

83-
// do something with the response or return it directly
87+
// ... do something with the response or return it directly
8488

8589
Getting information from the Request
8690
------------------------------------
@@ -270,4 +274,4 @@ That's all there is to it, and I'm not even sure we have spent the full
270274
10 minutes. We briefly introduced bundles in the first part, and all the
271275
features we've learned about so far are part of the core framework bundle.
272276
But thanks to bundles, everything in Symfony2 can be extended or replaced.
273-
That's the topic of the :doc:`next part of this tutorial<the_architecture>`.
277+
That's the topic of the :doc:`next part of this tutorial<the_architecture>`.

quick_tour/the_view.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ the ``index`` template. To do this, use the ``render`` tag:
186186
.. code-block:: jinja
187187
188188
{# src/Acme/DemoBundle/Resources/views/Demo/index.html.twig #}
189-
{% render "AcmeDemoBundle:Demo:fancy" with { 'name': name, 'color': 'green' } %}
189+
{% render "AcmeDemoBundle:Demo:fancy" with {'name': name, 'color': 'green'} %}
190190
191191
Here, the ``AcmeDemoBundle:Demo:fancy`` string refers to the ``fancy`` action
192192
of the ``Demo`` controller. The arguments (``name`` and ``color``) act like
@@ -229,6 +229,8 @@ pattern::
229229
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
230230
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
231231

232+
// ...
233+
232234
/**
233235
* @Route("/hello/{name}", name="_demo_hello")
234236
* @Template()
@@ -241,7 +243,7 @@ pattern::
241243
.. tip::
242244

243245
The ``url`` function generates *absolute* URLs: ``{{ url('_demo_hello', {
244-
'name': 'Thomas' }) }}``.
246+
'name': 'Thomas'}) }}``.
245247

246248
Including Assets: images, JavaScripts, and stylesheets
247249
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)