diff --git a/best_practices/templates.rst b/best_practices/templates.rst index 4783cb37aa7..0b6936ba3ef 100644 --- a/best_practices/templates.rst +++ b/best_practices/templates.rst @@ -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 diff --git a/book/routing.rst b/book/routing.rst index cab6efb7953..7e98a9d8974 100644 --- a/book/routing.rst +++ b/book/routing.rst @@ -410,7 +410,7 @@ entries? Update the route to have a new ``{page}`` placeholder: .. code-block:: php-annotations // src/AppBundle/Controller/BlogController.php - + // ... /** @@ -470,7 +470,7 @@ This is done by including it in the ``defaults`` collection: .. code-block:: php-annotations // src/AppBundle/Controller/BlogController.php - + // ... /** @@ -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:: @@ -555,7 +555,7 @@ Take a quick look at the routes that have been created so far: .. code-block:: php-annotations // src/AppBundle/Controller/BlogController.php - + // ... class BlogController extends Controller { @@ -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 @@ -738,7 +735,7 @@ URL: .. code-block:: php-annotations // src/AppBundle/Controller/MainController.php - + // ... class MainController extends Controller { @@ -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:: diff --git a/book/templating.rst b/book/templating.rst index 727b30aa8a6..7af3b9ef144 100644 --- a/book/templating.rst +++ b/book/templating.rst @@ -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 diff --git a/components/class_loader/class_map_generator.rst b/components/class_loader/class_map_generator.rst index 320a5d2acd4..d905c2b22e1 100644 --- a/components/class_loader/class_map_generator.rst +++ b/components/class_loader/class_map_generator.rst @@ -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 diff --git a/components/form/form_events.rst b/components/form/form_events.rst index 83768e78d4e..d89e4ca5e89 100644 --- a/components/form/form_events.rst +++ b/components/form/form_events.rst @@ -61,15 +61,13 @@ The ``FormEvents::PRE_SET_DATA`` event is dispatched at the beginning of the :ref:`Form Events Information 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` -+-----------------+------------------------------------------------------+ -| 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` -+-----------------+------------------------------------------+ -| 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` -+-----------------+-------------------------------------------------------------------------------------+ -| 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` -+-----------------+---------------------------------------------------------------+ -| 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`` diff --git a/components/http_kernel/introduction.rst b/components/http_kernel/introduction.rst index 13f93b45feb..3fee78f30b7 100644 --- a/components/http_kernel/introduction.rst +++ b/components/http_kernel/introduction.rst @@ -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: diff --git a/contributing/documentation/format.rst b/contributing/documentation/format.rst index 198b5f21218..eeedf1e00dd 100644 --- a/contributing/documentation/format.rst +++ b/contributing/documentation/format.rst @@ -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 diff --git a/cookbook/security/entity_provider.rst b/cookbook/security/entity_provider.rst index c2994ae7fd8..144d7809f48 100644 --- a/cookbook/security/entity_provider.rst +++ b/cookbook/security/entity_provider.rst @@ -447,11 +447,11 @@ The :class:`Symfony\\Component\\Security\\Core\\User\\AdvancedUserInterface` interface adds four extra methods to validate the account status: * :method:`Symfony\\Component\\Security\\Core\\User\\AdvancedUserInterface::isAccountNonExpired` - checks whether the user's account has expired, + checks whether the user's account has expired; * :method:`Symfony\\Component\\Security\\Core\\User\\AdvancedUserInterface::isAccountNonLocked` - checks whether the user is locked, + checks whether the user is locked; * :method:`Symfony\\Component\\Security\\Core\\User\\AdvancedUserInterface::isCredentialsNonExpired` - checks whether the user's credentials (password) has expired, + checks whether the user's credentials (password) has expired; * :method:`Symfony\\Component\\Security\\Core\\User\\AdvancedUserInterface::isEnabled` checks whether the user is enabled. diff --git a/cookbook/templating/twig_extension.rst b/cookbook/templating/twig_extension.rst index 14913b7b63d..1931e52d23e 100644 --- a/cookbook/templating/twig_extension.rst +++ b/cookbook/templating/twig_extension.rst @@ -98,10 +98,12 @@ Now you must let the Service Container know about your newly created Twig Extens .. note:: Keep in mind that Twig Extensions are not lazily loaded. This means that - there's a higher chance that you'll get a **CircularReferenceException** - or a **ScopeWideningInjectionException** if any services - (or your Twig Extension in this case) are dependent on the request service. - For more information take a look at :doc:`/cookbook/service_container/scopes`. + there's a higher chance that you'll get a + :class:`Symfony\\Component\\DependencyInjection\\Exception\\ServiceCircularReferenceException` + or a + :class:`Symfony\\Component\\DependencyInjection\\Exception\\ScopeWideningInjectionException` + if any services (or your Twig Extension in this case) are dependent on + the request service. For more information take a look at :doc:`/cookbook/service_container/scopes`. Using the custom Extension -------------------------- diff --git a/reference/constraints/UserPassword.rst b/reference/constraints/UserPassword.rst index ee879a0d7c2..84988594242 100644 --- a/reference/constraints/UserPassword.rst +++ b/reference/constraints/UserPassword.rst @@ -4,10 +4,11 @@ UserPassword .. note:: Since Symfony 2.2, the ``UserPassword*`` classes in the - ``Symfony\\Component\\Security\\Core\\Validator\\Constraint`` namespace are - deprecated and will be removed in Symfony 2.3. Please use the - ``UserPassword*`` classes in the - ``Symfony\\Component\\Security\\Core\\Validator\\Constraints`` namespace instead. + :namespace:`Symfony\\Component\\Security\\Core\\Validator\\Constraint ` + namespace are deprecated and will be removed in Symfony 2.3. Please use + the ``UserPassword*`` classes in the + :namespace:`Symfony\\Component\\Security\\Core\\Validator\\Constraints ` + namespace instead. This validates that an input value is equal to the current authenticated user's password. This is useful in a form where a user can change their password, diff --git a/reference/forms/types/choice.rst b/reference/forms/types/choice.rst index 95c91e8442b..a5757116817 100644 --- a/reference/forms/types/choice.rst +++ b/reference/forms/types/choice.rst @@ -104,7 +104,7 @@ is the item value and the array value is the item's label:: choice_list ~~~~~~~~~~~ -**type**: ``Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface`` +**type**: :class:`Symfony\\Component\\Form\\Extension\\Core\\ChoiceList\\ChoiceListInterface` This is one way of specifying the options to be used for this field. The ``choice_list`` option must be an instance of the ``ChoiceListInterface``. diff --git a/reference/forms/types/collection.rst b/reference/forms/types/collection.rst index 82327fd7e4f..3bc2f6453d6 100644 --- a/reference/forms/types/collection.rst +++ b/reference/forms/types/collection.rst @@ -376,9 +376,9 @@ error_bubbling Field Variables --------------- -============ =========== ======================================== -Variable Type Usage -============ =========== ======================================== -allow_add ``Boolean`` The value of the `allow_add`_ option. -allow_delete ``Boolean`` The value of the `allow_delete`_ option. -============ =========== ======================================== +============ =========== ======================================== +Variable Type Usage +============ =========== ======================================== +allow_add ``Boolean`` The value of the `allow_add`_ option. +allow_delete ``Boolean`` The value of the `allow_delete`_ option. +============ =========== ======================================== diff --git a/reference/forms/types/file.rst b/reference/forms/types/file.rst index 3751bdff8b1..36f6c2d06d0 100644 --- a/reference/forms/types/file.rst +++ b/reference/forms/types/file.rst @@ -110,8 +110,8 @@ The default value is ``null``. Form Variables -------------- -======== ========== =============================================================================== -Variable Type Usage -======== ========== =============================================================================== -type ``string`` The type variable is set to ``file``, in order to render as a file input field. -======== ========== =============================================================================== +======== ========== =============================================================================== +Variable Type Usage +======== ========== =============================================================================== +type ``string`` The type variable is set to ``file``, in order to render as a file input field. +======== ========== =============================================================================== diff --git a/reference/forms/types/money.rst b/reference/forms/types/money.rst index dd466595c3b..6db6ead9c06 100644 --- a/reference/forms/types/money.rst +++ b/reference/forms/types/money.rst @@ -121,10 +121,10 @@ The default value is ``''`` (the empty string). Form Variables -------------- -============= ========== =============================================================== -Variable Type Usage -============= ========== =============================================================== -money_pattern ``string`` The format to use to display the money, including the currency. -============= ========== =============================================================== +============= ========== =============================================================== +Variable Type Usage +============= ========== =============================================================== +money_pattern ``string`` The format to use to display the money, including the currency. +============= ========== =============================================================== .. _`3 letter ISO 4217 code`: http://en.wikipedia.org/wiki/ISO_4217 diff --git a/reference/forms/types/options/_date_limitation.rst.inc b/reference/forms/types/options/_date_limitation.rst.inc index 8a39d6f6b80..4178e4dbc51 100644 --- a/reference/forms/types/options/_date_limitation.rst.inc +++ b/reference/forms/types/options/_date_limitation.rst.inc @@ -1,5 +1,5 @@ .. caution:: - + If ``timestamp`` is used, ``DateType`` is limited to dates between Fri, 13 Dec 1901 20:45:54 GMT and Tue, 19 Jan 2038 03:14:07 GMT on 32bit - systems. This is due to a `limitation in PHP itself `_. \ No newline at end of file + systems. This is due to a `limitation in PHP itself `_. diff --git a/reference/forms/types/options/_error_bubbling_body.rst.inc b/reference/forms/types/options/_error_bubbling_body.rst.inc index 5fd93614456..19c0b2ddef7 100644 --- a/reference/forms/types/options/_error_bubbling_body.rst.inc +++ b/reference/forms/types/options/_error_bubbling_body.rst.inc @@ -1,3 +1,3 @@ If ``true``, any errors for this field will be passed to the parent field or form. For example, if set to ``true`` on a normal field, any errors for -that field will be attached to the main form, not to the specific field. \ No newline at end of file +that field will be attached to the main form, not to the specific field. diff --git a/reference/forms/types/options/block_name.rst.inc b/reference/forms/types/options/block_name.rst.inc index 4f11ba54f52..6cfdeaf9a10 100644 --- a/reference/forms/types/options/block_name.rst.inc +++ b/reference/forms/types/options/block_name.rst.inc @@ -1,7 +1,8 @@ block_name ~~~~~~~~~~~ -**type**: ``string`` **default**: the form's name (see :ref:`Knowing which block to customize `) +**type**: ``string`` **default**: the form's name (see :ref:`Knowing which +block to customize `) Allows you to override the block name used to render the form type. Useful for example if you have multiple instances of the same form and you diff --git a/reference/forms/types/options/button_attr.rst.inc b/reference/forms/types/options/button_attr.rst.inc index 39a2f6c35f4..fe1d7fde82b 100644 --- a/reference/forms/types/options/button_attr.rst.inc +++ b/reference/forms/types/options/button_attr.rst.inc @@ -10,6 +10,3 @@ as a key. This can be useful when you need to set a custom class for the button: $builder->add('save', 'button', array( 'attr' => array('class' => 'save'), )); - - - diff --git a/reference/forms/types/options/cascade_validation.rst.inc b/reference/forms/types/options/cascade_validation.rst.inc index 472a31d8251..c41b605f9f6 100644 --- a/reference/forms/types/options/cascade_validation.rst.inc +++ b/reference/forms/types/options/cascade_validation.rst.inc @@ -17,4 +17,3 @@ the data from ``CategoryType`` to also be validated. in the section about :ref:`Embedding a Single Object `. .. include:: /reference/forms/types/options/_error_bubbling_hint.rst.inc - diff --git a/reference/forms/types/options/checkbox_compound.rst.inc b/reference/forms/types/options/checkbox_compound.rst.inc index a97204c5cf8..bf328936647 100644 --- a/reference/forms/types/options/checkbox_compound.rst.inc +++ b/reference/forms/types/options/checkbox_compound.rst.inc @@ -3,6 +3,5 @@ compound **type**: ``boolean`` **default**: ``false`` -This option specifies if a form is compound. As it's not the -case for checkbox, by default the value is overridden with the -``false`` value. +This option specifies if a form is compound. As it's not the case for checkbox, +by default the value is overridden with the ``false`` value. diff --git a/reference/forms/types/options/date_format.rst.inc b/reference/forms/types/options/date_format.rst.inc index d8a6c370825..b6db52d68dd 100644 --- a/reference/forms/types/options/date_format.rst.inc +++ b/reference/forms/types/options/date_format.rst.inc @@ -1,7 +1,8 @@ format ~~~~~~ -**type**: ``integer`` or ``string`` **default**: `IntlDateFormatter::MEDIUM`_ (or ``yyyy-MM-dd`` if `widget`_ is ``single_text``) +**type**: ``integer`` or ``string`` **default**: `IntlDateFormatter::MEDIUM`_ +(or ``yyyy-MM-dd`` if `widget`_ is ``single_text``) Option passed to the ``IntlDateFormatter`` class, used to transform user input into the proper format. This is critical when the `widget`_ option is diff --git a/reference/forms/types/options/date_input.rst.inc b/reference/forms/types/options/date_input.rst.inc index 89aa73bc432..43f50abbd9d 100644 --- a/reference/forms/types/options/date_input.rst.inc +++ b/reference/forms/types/options/date_input.rst.inc @@ -14,4 +14,4 @@ your underlying object. Valid values are: The value that comes back from the form will also be normalized back into this format. -.. include:: /reference/forms/types/options/_date_limitation.rst.inc \ No newline at end of file +.. include:: /reference/forms/types/options/_date_limitation.rst.inc diff --git a/reference/forms/types/options/disabled.rst.inc b/reference/forms/types/options/disabled.rst.inc index 50d100a1f37..4a7190f4f10 100644 --- a/reference/forms/types/options/disabled.rst.inc +++ b/reference/forms/types/options/disabled.rst.inc @@ -6,6 +6,5 @@ disabled **type**: ``boolean`` **default**: ``false`` -If you don't want a user to modify the value of a field, you can set -the disabled option to true. Any submitted value will be ignored. - +If you don't want a user to modify the value of a field, you can set the disabled +option to true. Any submitted value will be ignored. diff --git a/reference/forms/types/options/error_bubbling.rst.inc b/reference/forms/types/options/error_bubbling.rst.inc index 21a53a887fa..dbe42833b17 100644 --- a/reference/forms/types/options/error_bubbling.rst.inc +++ b/reference/forms/types/options/error_bubbling.rst.inc @@ -3,4 +3,4 @@ error_bubbling **type**: ``Boolean`` **default**: ``false`` unless the form is ``compound`` -.. include:: /reference/forms/types/options/_error_bubbling_body.rst.inc \ No newline at end of file +.. include:: /reference/forms/types/options/_error_bubbling_body.rst.inc diff --git a/reference/forms/types/options/expanded.rst.inc b/reference/forms/types/options/expanded.rst.inc index 2543527300c..e41c28a5da4 100644 --- a/reference/forms/types/options/expanded.rst.inc +++ b/reference/forms/types/options/expanded.rst.inc @@ -4,4 +4,4 @@ expanded **type**: ``Boolean`` **default**: ``false`` If set to true, radio buttons or checkboxes will be rendered (depending -on the ``multiple`` value). If false, a select element will be rendered. \ No newline at end of file +on the ``multiple`` value). If false, a select element will be rendered. diff --git a/reference/forms/types/options/grouping.rst.inc b/reference/forms/types/options/grouping.rst.inc index e2e77178d5d..39aeddb6b2b 100644 --- a/reference/forms/types/options/grouping.rst.inc +++ b/reference/forms/types/options/grouping.rst.inc @@ -3,4 +3,8 @@ grouping **type**: ``integer`` **default**: ``false`` -This value is used internally as the ``NumberFormatter::GROUPING_USED`` value when using PHP's ``NumberFormatter`` class. Its documentation is non-existent, but it appears that if you set this to ``true``, numbers will be grouped with a comma or period (depending on your locale): ``12345.123`` would display as ``12,345.123``. \ No newline at end of file +This value is used internally as the ``NumberFormatter::GROUPING_USED`` value +when using PHP's ``NumberFormatter`` class. Its documentation is non-existent, +but it appears that if you set this to ``true``, numbers will be grouped with +a comma or period (depending on your locale): ``12345.123`` would display +as ``12,345.123``. diff --git a/reference/forms/types/options/hours.rst.inc b/reference/forms/types/options/hours.rst.inc index 51097ca25dc..2af89a163f6 100644 --- a/reference/forms/types/options/hours.rst.inc +++ b/reference/forms/types/options/hours.rst.inc @@ -4,4 +4,4 @@ hours **type**: ``array`` **default**: 0 to 23 List of hours available to the hours field type. This option is only relevant -when the ``widget`` option is set to ``choice``. \ No newline at end of file +when the ``widget`` option is set to ``choice``. diff --git a/reference/forms/types/options/invalid_message.rst.inc b/reference/forms/types/options/invalid_message.rst.inc index 3fbfbe276e8..c5c05432492 100644 --- a/reference/forms/types/options/invalid_message.rst.inc +++ b/reference/forms/types/options/invalid_message.rst.inc @@ -13,4 +13,4 @@ number field. Normal (business logic) validation (such as when setting a minimum length for a field) should be set using validation messages with your validation rules -(:ref:`reference`). \ No newline at end of file +(:ref:`reference`). diff --git a/reference/forms/types/options/invalid_message_parameters.rst.inc b/reference/forms/types/options/invalid_message_parameters.rst.inc index 71ae5bee601..286fbc45cb6 100644 --- a/reference/forms/types/options/invalid_message_parameters.rst.inc +++ b/reference/forms/types/options/invalid_message_parameters.rst.inc @@ -11,4 +11,4 @@ to that option and including the variables in this option:: // ... 'invalid_message' => 'You entered an invalid value - it should include %num% letters', 'invalid_message_parameters' => array('%num%' => 6), - )); \ No newline at end of file + )); diff --git a/reference/forms/types/options/model_timezone.rst.inc b/reference/forms/types/options/model_timezone.rst.inc index 4b0c6d36280..f06489ef65f 100644 --- a/reference/forms/types/options/model_timezone.rst.inc +++ b/reference/forms/types/options/model_timezone.rst.inc @@ -6,4 +6,4 @@ model_timezone Timezone that the input data is stored in. This must be one of the `PHP supported timezones`_. -.. _`PHP supported timezones`: http://php.net/manual/en/timezones.php \ No newline at end of file +.. _`PHP supported timezones`: http://php.net/manual/en/timezones.php diff --git a/reference/forms/types/options/multiple.rst.inc b/reference/forms/types/options/multiple.rst.inc index 7de60eda538..f5a61f28012 100644 --- a/reference/forms/types/options/multiple.rst.inc +++ b/reference/forms/types/options/multiple.rst.inc @@ -6,4 +6,4 @@ multiple If true, the user will be able to select multiple options (as opposed to choosing just one option). Depending on the value of the ``expanded`` option, this will render either a select tag or checkboxes if true and -a select tag or radio buttons if false. The returned value will be an array. \ No newline at end of file +a select tag or radio buttons if false. The returned value will be an array. diff --git a/reference/forms/types/options/preferred_choices.rst.inc b/reference/forms/types/options/preferred_choices.rst.inc index a195fd1a940..96f8268546c 100644 --- a/reference/forms/types/options/preferred_choices.rst.inc +++ b/reference/forms/types/options/preferred_choices.rst.inc @@ -20,9 +20,9 @@ This can be customized when rendering the field: .. configuration-block:: .. code-block:: jinja - + {{ form_widget(form.foo_choices, { 'separator': '=====' }) }} .. code-block:: php - + widget($form['foo_choices'], array('separator' => '=====')) ?> diff --git a/reference/forms/types/options/seconds.rst.inc b/reference/forms/types/options/seconds.rst.inc index 4e8d5c6c9cd..7acbf39025c 100644 --- a/reference/forms/types/options/seconds.rst.inc +++ b/reference/forms/types/options/seconds.rst.inc @@ -4,4 +4,4 @@ seconds **type**: ``array`` **default**: 0 to 59 List of seconds available to the seconds field type. This option is only -relevant when the ``widget`` option is set to ``choice``. \ No newline at end of file +relevant when the ``widget`` option is set to ``choice``. diff --git a/reference/forms/types/options/select_how_rendered.rst.inc b/reference/forms/types/options/select_how_rendered.rst.inc index cb785e18f54..b131971ffff 100644 --- a/reference/forms/types/options/select_how_rendered.rst.inc +++ b/reference/forms/types/options/select_how_rendered.rst.inc @@ -4,14 +4,11 @@ Select Tag, Checkboxes or Radio Buttons This field may be rendered as one of several different HTML fields, depending on the ``expanded`` and ``multiple`` options: -+------------------------------------------+----------+----------+ -| element type | expanded | multiple | -+==========================================+==========+==========+ -| select tag | false | false | -+------------------------------------------+----------+----------+ -| select tag (with ``multiple`` attribute) | false | true | -+------------------------------------------+----------+----------+ -| radio buttons | true | false | -+------------------------------------------+----------+----------+ -| checkboxes | true | true | -+------------------------------------------+----------+----------+ +======================================== ========= ========= +Element Type Expanded Multiple +======================================== ========= ========= +select tag ``false`` ``false`` +select tag (with ``multiple`` attribute) ``false`` ``true`` +radio buttons ``true`` ``false`` +checkboxes ``true`` ``true`` +======================================== ========= ========= diff --git a/reference/forms/types/options/trim.rst.inc b/reference/forms/types/options/trim.rst.inc index 1665e5d4333..68ba656be94 100644 --- a/reference/forms/types/options/trim.rst.inc +++ b/reference/forms/types/options/trim.rst.inc @@ -6,4 +6,4 @@ trim If true, the whitespace of the submitted string value will be stripped via the ``trim()`` function when the data is bound. This guarantees that if a value is submitted with extra whitespace, it will be removed before -the value is merged back onto the underlying object. \ No newline at end of file +the value is merged back onto the underlying object. diff --git a/reference/forms/types/options/view_timezone.rst.inc b/reference/forms/types/options/view_timezone.rst.inc index 5cffeeb5747..d2ab65adcbf 100644 --- a/reference/forms/types/options/view_timezone.rst.inc +++ b/reference/forms/types/options/view_timezone.rst.inc @@ -6,4 +6,4 @@ view_timezone Timezone for how the data should be shown to the user (and therefore also the data that the user submits). This must be one of the `PHP supported timezones`_. -.. _`PHP supported timezones`: http://php.net/manual/en/timezones.php \ No newline at end of file +.. _`PHP supported timezones`: http://php.net/manual/en/timezones.php diff --git a/reference/forms/types/options/with_seconds.rst.inc b/reference/forms/types/options/with_seconds.rst.inc index 684a748fb3e..cc9b0b12105 100644 --- a/reference/forms/types/options/with_seconds.rst.inc +++ b/reference/forms/types/options/with_seconds.rst.inc @@ -4,4 +4,4 @@ with_seconds **type**: ``Boolean`` **default**: ``false`` Whether or not to include seconds in the input. This will result in an additional -input to capture seconds. \ No newline at end of file +input to capture seconds. diff --git a/reference/forms/types/options/years.rst.inc b/reference/forms/types/options/years.rst.inc index 8a6e73a83a4..3c4655697f6 100644 --- a/reference/forms/types/options/years.rst.inc +++ b/reference/forms/types/options/years.rst.inc @@ -1,7 +1,8 @@ years ~~~~~ -**type**: ``array`` **default**: five years before to five years after the current year +**type**: ``array`` **default**: five years before to five years after the +current year List of years available to the year field type. This option is only relevant when the ``widget`` option is set to ``choice``. diff --git a/reference/forms/types/submit.rst b/reference/forms/types/submit.rst index 01847034d84..63385eb328c 100644 --- a/reference/forms/types/submit.rst +++ b/reference/forms/types/submit.rst @@ -76,8 +76,8 @@ from the "Registration" are validated. Form Variables -------------- -======== =========== ============================================================== -Variable Type Usage -======== =========== ============================================================== -clicked ``Boolean`` Whether the button is clicked or not. -======== =========== ============================================================== +======== =========== ============================================================== +Variable Type Usage +======== =========== ============================================================== +clicked ``Boolean`` Whether the button is clicked or not. +======== =========== ============================================================== diff --git a/reference/forms/types/variables/check_or_radio_table.rst.inc b/reference/forms/types/variables/check_or_radio_table.rst.inc index b6ef7527640..ae137a3f200 100644 --- a/reference/forms/types/variables/check_or_radio_table.rst.inc +++ b/reference/forms/types/variables/check_or_radio_table.rst.inc @@ -1,5 +1,5 @@ -======== ============ ============================================ -Variable Type Usage -======== ============ ============================================ -checked ``Boolean`` Whether or not the current input is checked. -======== ============ ============================================ +======== ============ ============================================ +Variable Type Usage +======== ============ ============================================ +checked ``Boolean`` Whether or not the current input is checked. +======== ============ ============================================