From 7a74bb348eb2fb92c808eb451fe9885f35edd2ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Bogusz?= Date: Sun, 8 Mar 2020 11:11:38 +0100 Subject: [PATCH] [Form] Add description of label_html option --- reference/configuration/framework.rst | 4 ---- reference/forms/types/button.rst | 3 +++ reference/forms/types/form.rst | 3 +++ reference/forms/types/options/label_html.rst.inc | 8 ++++++++ 4 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 reference/forms/types/options/label_html.rst.inc diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index fa021fbfd60..5b157120916 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -1260,10 +1260,6 @@ You can also configure the session handler with a DSN. For example: ], ]); -.. versionadded:: 4.4 - - The option to configure the session handler with a DSN was introduced in Symfony 4.4. - If you prefer to make Symfony store sessions in a database read :doc:`/doctrine/pdo_session_storage`. diff --git a/reference/forms/types/button.rst b/reference/forms/types/button.rst index b7d81868089..655d515215b 100644 --- a/reference/forms/types/button.rst +++ b/reference/forms/types/button.rst @@ -13,6 +13,7 @@ A simple, non-responsive button. | options | - `attr_translation_parameters`_ | | | - `disabled`_ | | | - `label`_ | +| | - `label_html`_ | | | - `label_translation_parameters`_ | | | - `row_attr`_ | | | - `translation_domain`_ | @@ -53,6 +54,8 @@ as a key. This can be useful when you need to set a custom class for the button: .. include:: /reference/forms/types/options/button_label.rst.inc +.. include:: /reference/forms/types/options/label_html.rst.inc + .. include:: /reference/forms/types/options/button_translation_domain.rst.inc label_translation_parameters diff --git a/reference/forms/types/form.rst b/reference/forms/types/form.rst index 4099436430b..8a0c219f410 100644 --- a/reference/forms/types/form.rst +++ b/reference/forms/types/form.rst @@ -42,6 +42,7 @@ on all types for which ``FormType`` is the parent. | | - `block_prefix`_ | | | - `disabled`_ | | | - `label`_ | +| | - `label_html`_ | | | - `row_attr`_ | | | - `translation_domain`_ | | | - `label_translation_parameters`_ | @@ -172,6 +173,8 @@ of the form type tree (i.e. it cannot be used as a form type on its own). .. include:: /reference/forms/types/options/label.rst.inc +.. include:: /reference/forms/types/options/label_html.rst.inc + .. include:: /reference/forms/types/options/row_attr.rst.inc .. include:: /reference/forms/types/options/translation_domain.rst.inc diff --git a/reference/forms/types/options/label_html.rst.inc b/reference/forms/types/options/label_html.rst.inc new file mode 100644 index 00000000000..5269c3d3b44 --- /dev/null +++ b/reference/forms/types/options/label_html.rst.inc @@ -0,0 +1,8 @@ +``label_html`` +~~~~~~~~~~~~~~ + +**type**: ``bool`` **default**: ``false`` + +By default, the contents of the ``label`` option are escaped before rendering +them in the template. Set this option to ``true`` to not escape them, which is +useful when the label contains HTML elements.