8000 Merge branch '4.3' into 4.4 · symfony/symfony-docs@c52c741 · GitHub
[go: up one dir, main page]

Skip to content

Commit c52c741

Browse files
committed
Merge branch '4.3' into 4.4
* 4.3: [Form] Documented the intl option in TimezoneType Removed a broken link
2 parents 13b687b + 7332730 commit c52c741

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

controller.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ The Base Controller Class & Services
9393

9494
To aid development, Symfony comes with an optional base controller class called
9595
:class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController`.
96-
It can be extended to gain access to `helper methods`_.
96+
It can be extended to gain access to helper methods.
9797

9898
Add the ``use`` statement atop your controller class and then modify
9999
``LuckyController`` to extend it:
@@ -641,6 +641,5 @@ Learn more about Controllers
641641

642642
controller/*
643643

644-
.. _`helper methods`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php
645644
.. _`Symfony Maker`: https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html
646645
.. _`unvalidated redirects security vulnerability`: https://www.owasp.org/index.php/Open_redirect

reference/forms/types/timezone.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ manually, but then you should just use the ``ChoiceType`` directly.
1818
| Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) |
1919
+-------------+------------------------------------------------------------------------+
2020
| Options | - `input`_ |
21+
| | - `intl`_ |
2122
| | - `regions`_ |
2223
+-------------+------------------------------------------------------------------------+
2324
| Overridden | - `choices`_ |
2425
| options | |
2526
+-------------+------------------------------------------------------------------------+
2627
| Inherited | from the :doc:`ChoiceType </reference/forms/types/choice>` |
2728
| options | |
29+
| | - `choice_translation_domain`_ |
2830
| | - `expanded`_ |
2931
| | - `multiple`_ |
3032
| | - `placeholder`_ |
@@ -73,6 +75,28 @@ on your underlying object. Valid values are:
7375

7476
The ``intltimezone`` input type was introduced in Symfony 4.3.
7577

78+
intl
79+
~~~~
80+
81+
*type**: ``boolean`` **default**: ``false``
82+
83+
.. versionadded:: 4.3
84+
85+
This option was introduced in Symfony 4.3.
86+
87+
If this option is set to ``true``, the timezone selector will display the
88+
timezones from the `ICU Project`_ via the :doc:`Intl component </components/intl>`
89+
instead of the regular PHP timezones.
90+
91+
Although both sets of timezones are pretty similar, only the ones from the Intl
92+
component can be translated to any language. To do so, set the desired locale
93+
with the ``choice_translation_locale`` option.
94+
95+
.. note::
96+
97+
The :doc:`Timezone constraint </reference/constraints/Timezone>` can validate
98+
both timezone sets and adapts to the selected set automatically.
99+
76100
regions
77101
~~~~~~~
78102

@@ -105,6 +129,8 @@ Inherited Options
105129

106130
These options inherit from the :doc:`ChoiceType </reference/forms/types/choice>`:
107131

132+
.. include:: /reference/forms/types/options/choice_translation_domain.rst.inc
133+
108134
.. include:: /reference/forms/types/options/expanded.rst.inc
109135

110136
.. include:: /reference/forms/types/options/multiple.rst.inc
@@ -152,3 +178,5 @@ The actual default value of this option depends on other field options:
152178
.. include:: /reference/forms/types/options/mapped.rst.inc
153179

154180
.. include:: /reference/forms/types/options/required.rst.inc
181+
182+
.. _`ICU Project`: http://site.icu-project.org/

0 commit comments

Comments
 (0)
0