Skip to content

Commit

Permalink
minor #4447 [Book] tweaks to #4427 (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.3 branch.

Discussion
----------

[Book] tweaks to #4427

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | all
| Fixed tickets |

Applied tweaks suggested by @javiereguiluz.

Commits
-------

caf927f tweaks to #4427
  • Loading branch information
weaverryan committed Nov 13, 2014
2 parents 8c2d837 + caf927f commit 0380d34
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions book/routing.rst
Expand Up @@ -410,7 +410,7 @@ entries? Update the route to have a new ``{page}`` placeholder:
.. code-block:: php-annotations .. code-block:: php-annotations
// src/AppBundle/Controller/BlogController.php // src/AppBundle/Controller/BlogController.php
// ... // ...
/** /**
Expand Down Expand Up @@ -470,7 +470,7 @@ This is done by including it in the ``defaults`` collection:
.. code-block:: php-annotations .. code-block:: php-annotations
// src/AppBundle/Controller/BlogController.php // src/AppBundle/Controller/BlogController.php
// ... // ...
/** /**
Expand Down Expand Up @@ -555,7 +555,7 @@ Take a quick look at the routes that have been created so far:
.. code-block:: php-annotations .. code-block:: php-annotations
// src/AppBundle/Controller/BlogController.php // src/AppBundle/Controller/BlogController.php
// ... // ...
class BlogController extends Controller class BlogController extends Controller
{ {
Expand Down Expand Up @@ -738,7 +738,7 @@ URL:
.. code-block:: php-annotations .. code-block:: php-annotations
// src/AppBundle/Controller/MainController.php // src/AppBundle/Controller/MainController.php
// ... // ...
class MainController extends Controller class MainController extends Controller
{ {
Expand Down Expand Up @@ -1283,8 +1283,8 @@ suppose you want to prefix all routes in the AppBundle with ``/site`` (e.g.
return $collection; return $collection;
The string ``/site`` will now be prepended to the path of each route loaded The path of each route being loaded from the new routing resource will now
from the new routing resource. be prefixed with the string ``/site``.


Adding a Host Requirement to Imported Routes Adding a Host Requirement to Imported Routes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
10 changes: 5 additions & 5 deletions book/templating.rst
Expand Up @@ -387,7 +387,7 @@ By default, templates can live in two different locations:
third party bundle templates (see :ref:`overriding-bundle-templates`); third party bundle templates (see :ref:`overriding-bundle-templates`);


* ``path/to/bundle/Resources/views/``: Each third party bundle houses its * ``path/to/bundle/Resources/views/``: Each third party bundle houses its
templates in its ``Resources/views`` directory (and subdirectories). When you templates in its ``Resources/views/`` directory (and subdirectories). When you
plan to share your bundle, you should put the templates in the bundle instead plan to share your bundle, you should put the templates in the bundle instead
of the ``app/`` directory. of the ``app/`` directory.


Expand Down Expand Up @@ -435,8 +435,8 @@ directory. This gives the power to override templates from any vendor bundle.


.. tip:: .. tip::


Hopefully the template naming syntax looks familiar - it's similair to the Hopefully the template naming syntax looks familiar - it's similar to
naming convention used to refer to :ref:`controller-string-syntax`. the naming convention used to refer to :ref:`controller-string-syntax`.


Template Suffix Template Suffix
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -1353,7 +1353,7 @@ covered:
{% endblock %} {% endblock %}


Notice that this template extends the section template (``Blog/layout.html.twig``) Notice that this template extends the section template (``Blog/layout.html.twig``)
which in-turn extends the base application layout (``base.html.twig``). This is which in turn extends the base application layout (``base.html.twig``). This is
the common three-level inheritance model. the common three-level inheritance model.


When building your application, you may choose to follow this method or simply When building your application, you may choose to follow this method or simply
Expand Down Expand Up @@ -1466,7 +1466,7 @@ Debugging


When using PHP, you can use :phpfunction:`var_dump` if you need to quickly find When using PHP, you can use :phpfunction:`var_dump` if you need to quickly find
the value of a variable passed. This is useful, for example, inside your the value of a variable passed. This is useful, for example, inside your
controller. The same can be achieved when using Twig thanks to the debug controller. The same can be achieved when using Twig thanks to the Debug
extension. extension.


Template parameters can then be dumped using the ``dump`` function: Template parameters can then be dumped using the ``dump`` function:
Expand Down

0 comments on commit 0380d34

Please sign in to comment.