Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3a8bd43

Browse files
committed
Added currency field type
1 parente00ba57 commit3a8bd43

File tree

3 files changed

+77
-0
lines changed

3 files changed

+77
-0
lines changed

‎reference/forms/types.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Form Types Reference
1414
types/choice
1515
types/collection
1616
types/country
17+
types/currency
1718
types/date
1819
types/datetime
1920
types/email

‎reference/forms/types/currency.rst

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
..index::
2+
single: Forms; Fields; currency
3+
4+
currency Field Type
5+
===================
6+
7+
The ``currency`` type is a subset of the
8+
:doc:`choice type </reference/forms/types/choice` that allows the user to
9+
select from a large list of `3-letter ISO 4217`_ currencies.
10+
11+
Unlike the ``choice`` type, you don't need to specify a ``choices`` or
12+
``choice_list`` option as the field type automatically uses a large list of
13+
currencies. You *can* specify either of these options manually, but then you
14+
should just use the ``choice`` type directly.
15+
16+
+-------------+------------------------------------------------------------------------+
17+
| Rendered as| can be various tags (see:ref:`forms-reference-choice-tags`)|
18+
+-------------+------------------------------------------------------------------------+
19+
| Overridden| - `choices`_|
20+
| Options||
21+
+-------------+------------------------------------------------------------------------+
22+
| Inherited| - `multiple`_|
23+
| options| - `expanded`_|
24+
|| - `preferred_choices`_|
25+
|| - `empty_value`_|
26+
|| - `error_bubbling`_|
27+
|| - `required`_|
28+
|| - `label`_|
29+
|| - `read_only`_|
30+
|| - `disabled`_|
31+
|| - `mapped`_|
32+
+-------------+------------------------------------------------------------------------+
33+
| Parent type|:doc:`choice</reference/forms/types/choice>`|
34+
+-------------+------------------------------------------------------------------------+
35+
| Class|:class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\CurrencyType`|
36+
+-------------+------------------------------------------------------------------------+
37+
38+
Overridden Options
39+
------------------
40+
41+
choices
42+
~~~~~~~
43+
44+
**default**: ``Symfony\Component\Intl\Intl::getCurrencyBundle()->getCurrencyNames()``
45+
46+
The choices option defaults to all currencies.
47+
48+
Inherited options
49+
-----------------
50+
51+
These options inherit from the:doc:`choice</reference/forms/types/choice>` type:
52+
53+
..include::/reference/forms/types/options/multiple.rst.inc
54+
55+
..include::/reference/forms/types/options/expanded.rst.inc
56+
57+
..include::/reference/forms/types/options/preferred_choices.rst.inc
58+
59+
..include::/reference/forms/types/options/empty_value.rst.inc
60+
61+
..include::/reference/forms/types/options/error_bubbling.rst.inc
62+
63+
These options inherit from the:doc:`date</reference/forms/types/form>` type:
64+
65+
..include::/reference/forms/types/options/required.rst.inc
66+
67+
..include::/reference/forms/types/options/label.rst.inc
68+
69+
..include::/reference/forms/types/options/read_only.rst.inc
70+
71+
..include::/reference/forms/types/options/disabled.rst.inc
72+
73+
..include::/reference/forms/types/options/mapped.rst.inc
74+
75+
.. _`3-letter ISO 4217`:http://en.wikipedia.org/wiki/ISO_4217

‎reference/forms/types/map.rst.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Choice Fields
2121
* :doc:`language</reference/forms/types/language>`
2222
* :doc:`locale</reference/forms/types/locale>`
2323
* :doc:`timezone</reference/forms/types/timezone>`
24+
* :doc:`currency</reference/forms/types/currency>`
2425

2526
Date and Time Fields
2627
~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp