Skip to content

Commit

Permalink
Fixes thanks to Wouter!
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed Jun 14, 2015
1 parent d172a29 commit 763a29a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
6 changes: 3 additions & 3 deletions book/bundles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.. _page-creation-bundles:

The Bundle System
-----------------
=================

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

Creating a Bundle
~~~~~~~~~~~~~~~~~
-----------------

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

Bundle Directory Structure
~~~~~~~~~~~~~~~~~~~~~~~~~~
--------------------------

The directory structure of a bundle is simple and flexible. By default, the
bundle system follows a set of conventions that help to keep code consistent
Expand Down
10 changes: 1 addition & 9 deletions book/page_creation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Creating a Page: Route and Controller

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

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

Before diving into this, test it out!

.. code-block:: text
http://localhost:8000/app_dev.php/lucky/number

.. tip::
Expand Down Expand Up @@ -129,8 +127,6 @@ Just add a second method to ``LuckyController``::

Try this out in your browser:

.. code-block:: text
http://localhost:8000/app_dev.php/api/lucky/number

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

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

.. code-block:: text
http://localhost:8000/app_dev.php/lucky/number/7

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

Refresh to see your template in action!

.. code-block:: text
http://localhost:8000/app_dev.php/lucky/number/9

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

0 comments on commit 763a29a

Please sign in to comment.