Skip to content

Commit 16c2ec2

Browse files
committed
Merge branch '4.4'
* 4.4: [Form] Documented the intl option in TimezoneType Removed a broken link
2 parents 6ddfadf + c52c741 commit 16c2ec2

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
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: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ 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-
| | |
21+
| | - `intl`_ |
2222
+-------------+------------------------------------------------------------------------+
2323
| Overridden | - `choices`_ |
2424
| options | |
2525
+-------------+------------------------------------------------------------------------+
2626
| Inherited | from the :doc:`ChoiceType </reference/forms/types/choice>` |
2727
| options | |
28+
| | - `choice_translation_domain`_ |
2829
| | - `expanded`_ |
2930
| | - `multiple`_ |
3031
| | - `placeholder`_ |
@@ -69,6 +70,24 @@ on your underlying object. Valid values are:
6970
* ``intltimezone`` (an ``\IntlTimeZone`` object)
7071
* ``string`` (e.g. ``America/New_York``)
7172

73+
intl
74+
~~~~
75+
76+
*type**: ``boolean`` **default**: ``false``
77+
78+
If this option is set to ``true``, the timezone selector will display the
79+
timezones from the `ICU Project`_ via the :doc:`Intl component </components/intl>`
80+
instead of the regular PHP timezones.
81+
82+
Although both sets of timezones are pretty similar, only the ones from the Intl
83+
component can be translated to any language. To do so, set the desired locale
84+
with the ``choice_translation_locale`` option.
85+
86+
.. note::
87+
88+
The :doc:`Timezone constraint </reference/constraints/Timezone>` can validate
89+
both timezone sets and adapts to the selected set automatically.
90+
7291
Overridden Options
7392
------------------
7493

@@ -90,6 +109,8 @@ Inherited Options
90109

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

112+
.. include:: /reference/forms/types/options/choice_translation_domain.rst.inc
113+
93114
.. include:: /reference/forms/types/options/expanded.rst.inc
94115

95116
.. include:: /reference/forms/types/options/multiple.rst.inc
@@ -137,3 +158,5 @@ The actual default value of this option depends on other field options:
137158
.. include:: /reference/forms/types/options/mapped.rst.inc
138159

139160
.. include:: /reference/forms/types/options/required.rst.inc
161+
162+
.. _`ICU Project`: http://site.icu-project.org/

0 commit comments

Comments
 (0)