Skip to content

Commit 31c76c6

Browse files
committed
Fixes thanks to Wouter!
1 parent bc33dad commit 31c76c6

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

book/bundles.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.. _page-creation-bundles:
55

66
The Bundle System
7-
-----------------
7+
=================
88

99
A bundle is similar to a plugin in other software, but even better. The key
1010
difference is that *everything* is a bundle in Symfony, including both the
@@ -63,7 +63,7 @@ are used by your application (including the core Symfony bundles).
6363
autoloader configured at ``app/autoload.php``).
6464

6565
Creating a Bundle
66-
~~~~~~~~~~~~~~~~~
66+
-----------------
6767

6868
The Symfony Standard Edition comes with a handy task that creates a fully-functional
6969
bundle for you. Of course, creating a bundle by hand is pretty easy as well.
@@ -135,7 +135,7 @@ tools later.
135135
the ``generate:bundle`` command, this is done for you.
136136

137137
Bundle Directory Structure
138-
~~~~~~~~~~~~~~~~~~~~~~~~~~
138+
--------------------------
139139

140140
The directory structure of a bundle is simple and flexible. By default, the
141141
bundle system follows a set of conventions that help to keep code consistent

book/page_creation.rst

+1-9
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Creating a Page: Route and Controller
3434

3535
Suppose you want to create a page - ``/lucky/number`` - that generates a
3636
lucky (well, random) number and prints it. To do that, create a class and
37-
a method inside of it that will be executed when someone goes to ``/lucky/random``::
37+
a method inside of it that will be executed when someone goes to ``/lucky/number``::
3838

3939
// src/AppBundle/Controller/LuckyController.php
4040
namespace AppBundle\Controller;
@@ -60,8 +60,6 @@ a method inside of it that will be executed when someone goes to ``/lucky/random
6060

6161
Before diving into this, test it out!
6262

63-
.. code-block:: text
64-
6563
http://localhost:8000/app_dev.php/lucky/number
6664

6765
.. tip::
@@ -129,8 +127,6 @@ Just add a second method to ``LuckyController``::
129127

130128
Try this out in your browser:
131129

132-
.. code-block:: text
133-
134130
http://localhost:8000/app_dev.php/api/lucky/number
135131

136132
You can even shorten this with the handy :class:`Symfony\\Component\\HttpFoundation\\JsonResponse`::
@@ -252,8 +248,6 @@ The best part is that you can access this value and use it in your controller::
252248

253249
Try it by going to ``/lucky/number/XX`` - replacing XX with *any* number:
254250

255-
.. code-block:: text
256-
257251
http://localhost:8000/app_dev.php/lucky/number/7
258252

259253
You should see *7* lucky numbers printed out! You can get the value of any
@@ -411,8 +405,6 @@ to put the content into the middle of the ``base.html.twig`` layout.
411405

412406
Refresh to see your template in action!
413407

414-
.. code-block:: text
415-
416408
http://localhost:8000/app_dev.php/lucky/number/9
417409

418410
If you view the source code, you now have a basic HTML structure thanks to

0 commit comments

Comments
 (0)