Permalink
Browse files

minor #4435 consistent table headlines (xabbuh)

This PR was merged into the 2.3 branch.

Discussion
----------

consistent table headlines

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

Commits
-------

10b607b separate table columns with two spaces
178a2d6 consistent table headlines
  • Loading branch information...
weaverryan committed Nov 13, 2014
2 parents 0380d34 + 10b607b commit 6995b07f2330004f466da5f86b599acc402a4d72
Showing with 193 additions and 217 deletions.
  1. +9 −9 best_practices/templates.rst
  2. +33 −36 book/routing.rst
  3. +7 −7 book/templating.rst
  4. +8 −11 components/class_loader/class_map_generator.rst
  5. +44 −58 components/form/form_events.rst
  6. +10 −15 components/http_kernel/introduction.rst
  7. +1 −1 contributing/documentation/format.rst
  8. +3 −3 cookbook/security/entity_provider.rst
  9. +6 −4 cookbook/templating/twig_extension.rst
  10. +5 −4 reference/constraints/UserPassword.rst
  11. +1 −1 reference/forms/types/choice.rst
  12. +6 −6 reference/forms/types/collection.rst
  13. +5 −5 reference/forms/types/file.rst
  14. +5 −5 reference/forms/types/money.rst
  15. +2 −2 reference/forms/types/options/_date_limitation.rst.inc
  16. +1 −1 reference/forms/types/options/_error_bubbling_body.rst.inc
  17. +2 −1 reference/forms/types/options/block_name.rst.inc
  18. +0 −3 reference/forms/types/options/button_attr.rst.inc
  19. +0 −1 reference/forms/types/options/cascade_validation.rst.inc
  20. +2 −3 reference/forms/types/options/checkbox_compound.rst.inc
  21. +2 −1 reference/forms/types/options/date_format.rst.inc
  22. +1 −1 reference/forms/types/options/date_input.rst.inc
  23. +2 −3 reference/forms/types/options/disabled.rst.inc
  24. +1 −1 reference/forms/types/options/error_bubbling.rst.inc
  25. +1 −1 reference/forms/types/options/expanded.rst.inc
  26. +5 −1 reference/forms/types/options/grouping.rst.inc
  27. +1 −1 reference/forms/types/options/hours.rst.inc
  28. +1 −1 reference/forms/types/options/invalid_message.rst.inc
  29. +1 −1 reference/forms/types/options/invalid_message_parameters.rst.inc
  30. +1 −1 reference/forms/types/options/model_timezone.rst.inc
  31. +1 −1 reference/forms/types/options/multiple.rst.inc
  32. +2 −2 reference/forms/types/options/preferred_choices.rst.inc
  33. +1 −1 reference/forms/types/options/seconds.rst.inc
  34. +8 −11 reference/forms/types/options/select_how_rendered.rst.inc
  35. +1 −1 reference/forms/types/options/trim.rst.inc
  36. +1 −1 reference/forms/types/options/view_timezone.rst.inc
  37. +1 −1 reference/forms/types/options/with_seconds.rst.inc
  38. +2 −1 reference/forms/types/options/years.rst.inc
  39. +5 −5 reference/forms/types/submit.rst
  40. +5 −5 reference/forms/types/variables/check_or_radio_table.rst.inc
@@ -37,15 +37,15 @@ But for the templates used in your application, it's much more convenient
to store them in the ``app/Resources/views/`` directory. For starters, this
drastically simplifies their logical names:
================================================== ==================================
Templates stored inside bundles Templates stored in ``app/``
================================================== ==================================
``AcmeDemoBundle:Default:index.html.twig`` ``default/index.html.twig``
``::layout.html.twig`` ``layout.html.twig``
``AcmeDemoBundle::index.html.twig`` ``index.html.twig``
``AcmeDemoBundle:Default:subdir/index.html.twig`` ``default/subdir/index.html.twig``
``AcmeDemoBundle:Default/subdir:index.html.twig`` ``default/subdir/index.html.twig``
================================================== ==================================
================================================= ==================================
Templates Stored inside Bundles Templates Stored in ``app/``
================================================= ==================================
``AcmeDemoBundle:Default:index.html.twig`` ``default/index.html.twig``
``::layout.html.twig`` ``layout.html.twig``
``AcmeDemoBundle::index.html.twig`` ``index.html.twig``
``AcmeDemoBundle:Default:subdir/index.html.twig`` ``default/subdir/index.html.twig``
``AcmeDemoBundle:Default/subdir:index.html.twig`` ``default/subdir/index.html.twig``
================================================= ==================================
Another advantage is that centralizing your templates simplifies the work
of your designers. They don't need to look for templates in lots of directories
@@ -522,13 +522,13 @@ longer required. The URL ``/blog`` will match this route and the value of
the ``page`` parameter will be set to ``1``. The URL ``/blog/2`` will also
match, giving the ``page`` parameter a value of ``2``. Perfect.
=========== ===== ==========
URL route parameters
=========== ===== ==========
``/blog`` blog {page} = 1
``/blog/1`` blog {page} = 1
``/blog/2`` blog {page} = 2
=========== ===== ==========
=========== ======== ==================
URL Route Parameters
=========== ======== ==================
``/blog`` ``blog`` ``{page}`` = ``1``
``/blog/1`` ``blog`` ``{page}`` = ``1``
``/blog/2`` ``blog`` ``{page}`` = ``2``
=========== ======== ==================
.. caution::
@@ -631,13 +631,12 @@ will *never* be matched. Instead, a URL like ``/blog/my-blog-post`` will match
the first route (``blog``) and return a nonsense value of ``my-blog-post``
to the ``{page}`` parameter.
+--------------------+-------+-----------------------+
| URL | route | parameters |
+====================+=======+=======================+
| /blog/2 | blog | {page} = 2 |
+--------------------+-------+-----------------------+
| /blog/my-blog-post | blog | {page} = my-blog-post |
+--------------------+-------+-----------------------+
====================== ======== ===============================
URL Route Parameters
====================== ======== ===============================
``/blog/2`` ``blog`` ``{page}`` = ``2``
``/blog/my-blog-post`` ``blog`` ``{page}`` = ``"my-blog-post"``
====================== ======== ===============================
The answer to the problem is to add route *requirements*. The routes in this
example would work perfectly if the ``/blog/{page}`` path *only* matched
@@ -710,15 +709,13 @@ is *not* a number).
As a result, a URL like ``/blog/my-blog-post`` will now properly match the
``blog_show`` route.
+----------------------+-----------+-------------------------+
| URL | route | parameters |
+======================+===========+=========================+
| /blog/2 | blog | {page} = 2 |
+----------------------+-----------+-------------------------+
| /blog/my-blog-post | blog_show | {slug} = my-blog-post |
+----------------------+-----------+-------------------------+
| /blog/2-my-blog-post | blog_show | {slug} = 2-my-blog-post |
+----------------------+-----------+-------------------------+
======================== ============= ===============================
URL Route Parameters
======================== ============= ===============================
``/blog/2`` ``blog`` ``{page}`` = ``2``
``/blog/my-blog-post`` ``blog_show`` ``{slug}`` = ``my-blog-post``
``/blog/2-my-blog-post`` ``blog_show`` ``{slug}`` = ``2-my-blog-post``
======================== ============= ===============================
.. sidebar:: Earlier Routes always Win
@@ -794,14 +791,14 @@ URL:
For incoming requests, the ``{_locale}`` portion of the URL is matched against
the regular expression ``(en|fr)``.
======= ========================
path parameters
======= ========================
``/`` {_locale} = en
``/en`` {_locale} = en
``/fr`` {_locale} = fr
``/es`` *won't match this route*
======= ========================
======= ========================
Path Parameters
======= ========================
``/`` ``{_locale}`` = ``"en"``
``/en`` ``{_locale}`` = ``"en"``
``/fr`` ``{_locale}`` = ``"fr"``
``/es`` *won't match this route*
======= ========================
.. index::
single: Routing; Method requirement
@@ -1065,11 +1062,11 @@ each separated by a colon:
For example, a ``_controller`` value of ``AppBundle:Blog:show`` means:
========= ================== ==============
Bundle Controller Class Method Name
========= ================== ==============
AppBundle ``BlogController`` ``showAction``
========= ================== ==============
========= ================== ==============
Bundle Controller Class Method Name
========= ================== ==============
AppBundle ``BlogController`` ``showAction``
========= ================== ==============
The controller might look like this::
@@ -444,13 +444,13 @@ Template Suffix
Every template name also has two extensions that specify the *format* and
*engine* for that template.
======================== ====== ======
Filename Format Engine
======================== ====== ======
``Blog/index.html.twig`` HTML Twig
``Blog/index.html.php`` HTML PHP
``Blog/index.css.twig`` CSS Twig
======================== ====== ======
======================== ====== ======
Filename Format Engine
======================== ====== ======
``Blog/index.html.twig`` HTML Twig
``Blog/index.html.php`` HTML PHP
``Blog/index.css.twig`` CSS Twig
======================== ====== ======
By default, any Symfony template can be written in either Twig or PHP, and
the last part of the extension (e.g. ``.twig`` or ``.php``) specifies which
@@ -28,17 +28,14 @@ manually. For example, imagine a library with the following directory structure:
These files contain the following classes:
=========================== ================
File Class name
=========================== ================
``library/bar/baz/Boo.php`` ``Acme\Bar\Baz``
--------------------------- ----------------
``library/bar/Foo.php`` ``Acme\Bar``
--------------------------- ----------------
``library/foo/bar/Foo.php`` ``Acme\Foo\Bar``
--------------------------- ----------------
``library/foo/Bar.php`` ``Acme\Foo``
=========================== ================
=========================== ================
File Class Name
=========================== ================
``library/bar/baz/Boo.php`` ``Acme\Bar\Baz``
``library/bar/Foo.php`` ``Acme\Bar``
``library/foo/bar/Foo.php`` ``Acme\Foo\Bar``
``library/foo/Bar.php`` ``Acme\Foo``
=========================== ================
To make your life easier, the ClassLoader component comes with a
:class:`Symfony\\Component\\ClassLoader\\ClassMapGenerator` class that makes
@@ -61,15 +61,13 @@ The ``FormEvents::PRE_SET_DATA`` event is dispatched at the beginning of the
:ref:`Form Events Information Table<component-form-event-table>`
+-----------------+-----------+
| Data type | Value |
+=================+===========+
| Model data | ``null`` |
+-----------------+-----------+
| Normalized data | ``null`` |
+-----------------+-----------+
| View data | ``null`` |
+-----------------+-----------+
=============== ========
Data Type Value
=============== ========
Model data ``null``
Normalized data ``null``
View data ``null``
=============== ========
.. caution::
@@ -98,15 +96,13 @@ the form.
:ref:`Form Events Information Table<component-form-event-table>`
+-----------------+------------------------------------------------------+
| Data type | Value |
+=================+======================================================+
| Model data | Model data injected into ``setData()`` |
+-----------------+------------------------------------------------------+
| Normalized data | Model data transformed using a model transformer |
+-----------------+------------------------------------------------------+
| View data | Normalized data transformed using a view transformer |
+-----------------+------------------------------------------------------+
=============== ====================================================
Data Type Value
=============== ====================================================
Model data Model data injected into ``setData()``
Normalized data Model data transformed using a model transformer
View data Normalized data transformed using a view transformer
=============== ====================================================
.. sidebar:: ``FormEvents::POST_SET_DATA`` in the Form component
@@ -140,15 +136,13 @@ It can be used to:
:ref:`Form Events Information Table<component-form-event-table>`
+-----------------+------------------------------------------+
| Data type | Value |
+=================+==========================================+
| Model data | Same as in ``FormEvents::POST_SET_DATA`` |
+-----------------+------------------------------------------+
| Normalized data | Same as in ``FormEvents::POST_SET_DATA`` |
+-----------------+------------------------------------------+
| View data | Same as in ``FormEvents::POST_SET_DATA`` |
+-----------------+------------------------------------------+
=============== ========================================
Data Type Value
=============== ========================================
Model data Same as in ``FormEvents::POST_SET_DATA``
Normalized data Same as in ``FormEvents::POST_SET_DATA``
View data Same as in ``FormEvents::POST_SET_DATA``
=============== ========================================
.. sidebar:: ``FormEvents::PRE_SUBMIT`` in the Form component
@@ -170,15 +164,13 @@ It can be used to change data from the normalized representation of the data.
:ref:`Form Events Information Table<component-form-event-table>`
+-----------------+-------------------------------------------------------------------------------------+
| Data type | Value |
+=================+=====================================================================================+
| Model data | Same as in ``FormEvents::POST_SET_DATA`` |
+-----------------+-------------------------------------------------------------------------------------+
| Normalized data | Data from the request reverse-transformed from the request using a view transformer |
+-----------------+-------------------------------------------------------------------------------------+
| View data | Same as in ``FormEvents::POST_SET_DATA`` |
+-----------------+-------------------------------------------------------------------------------------+
=============== ===================================================================================
Data Type Value
=============== ===================================================================================
Model data Same as in ``FormEvents::POST_SET_DATA``
Normalized data Data from the request reverse-transformed from the request using a view transformer
View data Same as in ``FormEvents::POST_SET_DATA``
=============== ===================================================================================
.. caution::
@@ -202,15 +194,13 @@ It can be used to fetch data after denormalization.
:ref:`Form Events Information Table<component-form-event-table>`
+-----------------+---------------------------------------------------------------+
| Data type | Value |
+=================+===============================================================+
| Model data | Normalized data reverse-transformed using a model transformer |
+-----------------+---------------------------------------------------------------+
| Normalized data | Same as in ``FormEvents::POST_SUBMIT`` |
+-----------------+---------------------------------------------------------------+
| View data | Normalized data transformed using a view transformer |
+-----------------+---------------------------------------------------------------+
=============== =============================================================
Data Type Value
=============== =============================================================
Model data Normalized data reverse-transformed using a model transformer
Normalized data Same as in ``FormEvents::POST_SUBMIT``
View data Normalized data transformed using a view transformer
=============== =============================================================
.. caution::
@@ -242,19 +232,15 @@ processed.
.. _component-form-event-table:
+------------------------+-------------------------------+------------------+
| Name | ``FormEvents`` Constant | Event's data |
+========================+===============================+==================+
| ``form.pre_set_data`` | ``FormEvents::PRE_SET_DATA`` | Model data |
+------------------------+-------------------------------+------------------+
| ``form.post_set_data`` | ``FormEvents::POST_SET_DATA`` | Model data |
+------------------------+-------------------------------+------------------+
| ``form.pre_bind`` | ``FormEvents::PRE_SUBMIT`` | Request data |
+------------------------+-------------------------------+------------------+
| ``form.bind`` | ``FormEvents::SUBMIT`` | Normalized data |
+------------------------+-------------------------------+------------------+
| ``form.post_bind`` | ``FormEvents::POST_SUBMIT`` | View data |
+------------------------+-------------------------------+------------------+
====================== ============================= ===============
Name ``FormEvents`` Constant Event's Data
====================== ============================= ===============
``form.pre_set_data`` ``FormEvents::PRE_SET_DATA`` Model data
``form.post_set_data`` ``FormEvents::POST_SET_DATA`` Model data
``form.pre_bind`` ``FormEvents::PRE_SUBMIT`` Request data
``form.bind`` ``FormEvents::SUBMIT`` Normalized data
``form.post_bind`` ``FormEvents::POST_SUBMIT`` View data
====================== ============================= ===============
.. versionadded:: 2.3
Before Symfony 2.3, ``FormEvents::PRE_SUBMIT``, ``FormEvents::SUBMIT``
@@ -575,21 +575,16 @@ each event has their own event object:
.. _component-http-kernel-event-table:
+-------------------+-------------------------------+-------------------------------------------------------------------------------------+
| Name | ``KernelEvents`` Constant | Argument passed to the listener |
+===================+===============================+=====================================================================================+
| kernel.request | ``KernelEvents::REQUEST`` | :class:`Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent` |
+-------------------+-------------------------------+-------------------------------------------------------------------------------------+
| kernel.controller | ``KernelEvents::CONTROLLER`` | :class:`Symfony\\Component\\HttpKernel\\Event\\FilterControllerEvent` |
+-------------------+-------------------------------+-------------------------------------------------------------------------------------+
| kernel.view | ``KernelEvents::VIEW`` | :class:`Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent` |
+-------------------+-------------------------------+-------------------------------------------------------------------------------------+
| kernel.response | ``KernelEvents::RESPONSE`` | :class:`Symfony\\Component\\HttpKernel\\Event\\FilterResponseEvent` |
+-------------------+-------------------------------+-------------------------------------------------------------------------------------+
| kernel.terminate | ``KernelEvents::TERMINATE`` | :class:`Symfony\\Component\\HttpKernel\\Event\\PostResponseEvent` |
+-------------------+-------------------------------+-------------------------------------------------------------------------------------+
| kernel.exception | ``KernelEvents::EXCEPTION`` | :class:`Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent` |
+-------------------+-------------------------------+-------------------------------------------------------------------------------------+
================= ============================ ===================================================================================
Name ``KernelEvents`` Constant Argument Passed to the Listener
================= ============================ ===================================================================================
kernel.request ``KernelEvents::REQUEST`` :class:`Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent`
kernel.controller ``KernelEvents::CONTROLLER`` :class:`Symfony\\Component\\HttpKernel\\Event\\FilterControllerEvent`
kernel.view ``KernelEvents::VIEW`` :class:`Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent`
kernel.response ``KernelEvents::RESPONSE`` :class:`Symfony\\Component\\HttpKernel\\Event\\FilterResponseEvent`
kernel.terminate ``KernelEvents::TERMINATE`` :class:`Symfony\\Component\\HttpKernel\\Event\\PostResponseEvent`
kernel.exception ``KernelEvents::EXCEPTION`` :class:`Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent`
================= ============================ ===================================================================================
.. _http-kernel-working-example:
@@ -92,7 +92,7 @@ The previous reST snippet renders as follow:
The current list of supported formats are the following:
=================== ======================================
Markup format Use it to display
Markup Format Use It to Display
=================== ======================================
``html`` HTML
``xml`` XML
Oops, something went wrong.

0 comments on commit 6995b07

Please sign in to comment.