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

Commit67129b1

Browse files
committed
minorsymfony#3611 [Reference][Forms] add an introductory table containing all options of the basic form type (xabbuh)
This PR was merged into the 2.3 branch.Discussion----------[Reference][Forms] add an introductory table containing all options of the basic form type| Q | A| ------------- | ---| Doc fix? | yes| New docs? | no| Applies to | all| Fixed tickets |Commits-------b3ca94c removed the description of the auto_initialize option from the button type reference docs58170fe document the auto_initialize option for the form type, refssymfony#34102ca0306 document the options inherited from the BaseType class911cc70 add an introductory table containing all options of the basic form type
2 parentsfd8f7ae +b3ca94c commit67129b1

File tree

4 files changed

+83
-33
lines changed

4 files changed

+83
-33
lines changed

‎reference/forms/types/button.rst

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,24 @@ A simple, non-responsive button.
1212
+----------------------+----------------------------------------------------------------------+
1313
| Rendered as| ``button`` tag|
1414
+----------------------+----------------------------------------------------------------------+
15-
|Options| - `attr`_|
16-
|| - `disabled`_|
15+
|Inherited| - `attr`_|
16+
|options| - `disabled`_|
1717
|| - `label`_|
1818
|| - `translation_domain`_|
1919
+----------------------+----------------------------------------------------------------------+
20-
| Overridden options| - `auto_initialize`_|
21-
+----------------------+----------------------------------------------------------------------+
2220
| Parent type| none|
2321
+----------------------+----------------------------------------------------------------------+
2422
| Class|:class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\ButtonType`|
2523
+----------------------+----------------------------------------------------------------------+
2624

27-
Options
28-
-------
25+
Inherited options
26+
-----------------
27+
28+
The following options are defined in the
29+
:class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\BaseType` class.
30+
The ``BaseType`` class is the parent class for both the ``button`` type and
31+
the:doc:`form type</reference/forms/types/form>`, but it is not part of
32+
the form type tree (i.e. it can not be used as a form type on its own).
2933

3034
..include::/reference/forms/types/options/button_attr.rst.inc
3135

@@ -34,8 +38,3 @@ Options
3438
..include::/reference/forms/types/options/button_label.rst.inc
3539

3640
..include::/reference/forms/types/options/button_translation_domain.rst.inc
37-
38-
Overridden Options
39-
------------------
40-
41-
..include::/reference/forms/types/options/button_auto_initialize.rst.inc

‎reference/forms/types/form.rst

Lines changed: 65 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,47 @@
44
form Field Type
55
===============
66

7-
See:class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType`.
8-
97
The ``form`` type predefines a couple of options that are then available
10-
on all fields.
8+
on all types for which ``form`` is the parent type.
9+
10+
+-----------+--------------------------------------------------------------------+
11+
| Options| - `compound`_|
12+
|| - `data`_|
13+
|| - `data_class`_|
14+
|| - `empty_data`_|
15+
|| - `required`_|
16+
|| - `label_attr`_|
17+
|| - `constraints`_|
18+
|| - `cascade_validation`_|
19+
|| - `read_only`_|
20+
|| - `trim`_|
21+
|| - `mapped`_|
22+
|| - `property_path`_|
23+
|| - `max_length`_|
24+
|| - `by_reference`_|
25+
|| - `error_bubbling`_|
26+
|| - `inherit_data`_|
27+
|| - `error_mapping`_|
28+
|| - `invalid_message`_|
29+
|| - `invalid_message_parameters`_|
30+
|| - `extra_fields_message`_|
31+
|| - `post_max_size_message`_|
32+
|| - `pattern`_|
33+
+-----------+--------------------------------------------------------------------+
34+
| Inherited| - `block_name`_|
35+
| options| - `disabled`_|
36+
|| - `label`_|
37+
|| - `attr`_|
38+
|| - `translation_domain`_|
39+
|| - `auto_initialize`_|
40+
+-----------+--------------------------------------------------------------------+
41+
| Parent| none|
42+
+-----------+--------------------------------------------------------------------+
43+
| Class|:class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType`|
44+
+-----------+--------------------------------------------------------------------+
45+
46+
Options
47+
-------
1148

1249
..include::/reference/forms/types/options/data.rst.inc
1350

@@ -25,8 +62,6 @@ on all fields.
2562

2663
..include::/reference/forms/types/options/required.rst.inc
2764

28-
..include::/reference/forms/types/options/label.rst.inc
29-
3065
..include::/reference/forms/types/options/label_attr.rst.inc
3166

3267
..include::/reference/forms/types/options/constraints.rst.inc
@@ -35,20 +70,12 @@ on all fields.
3570

3671
..include::/reference/forms/types/options/read_only.rst.inc
3772

38-
..include::/reference/forms/types/options/disabled.rst.inc
39-
4073
..include::/reference/forms/types/options/trim.rst.inc
4174

4275
..include::/reference/forms/types/options/mapped.rst.inc
4376

4477
..include::/reference/forms/types/options/property_path.rst.inc
4578

46-
..include::/reference/forms/types/options/attr.rst.inc
47-
48-
..include::/reference/forms/types/options/translation_domain.rst.inc
49-
50-
..include::/reference/forms/types/options/block_name.rst.inc
51-
5279
.. _reference-form-option-max_length:
5380

5481
..include::/reference/forms/types/options/max_length.rst.inc
@@ -72,3 +99,28 @@ on all fields.
7299
.. _reference-form-option-pattern:
73100

74101
..include::/reference/forms/types/options/pattern.rst.inc
102+
103+
..include::/reference/forms/types/options/action.rst.inc
104+
105+
..include::/reference/forms/types/options/method.rst.inc
106+
107+
Inherited options
108+
-----------------
109+
110+
The following options are defined in the
111+
:class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\BaseType` class.
112+
The ``BaseType`` class is the parent class for both the ``form`` type and
113+
the:doc:`button type</reference/forms/types/button>`, but it is not part
114+
of the form type tree (i.e. it can not be used as a form type on its own).
115+
116+
..include::/reference/forms/types/options/block_name.rst.inc
117+
118+
..include::/reference/forms/types/options/disabled.rst.inc
119+
120+
..include::/reference/forms/types/options/label.rst.inc
121+
122+
..include::/reference/forms/types/options/attr.rst.inc
123+
124+
..include::/reference/forms/types/options/translation_domain.rst.inc
125+
126+
..include::/reference/forms/types/options/auto_initialize.rst.inc
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
auto_initialize
2+
~~~~~~~~~~~~~~~
3+
4+
**type**: ``boolean`` **default**: ``true``
5+
6+
An internal option: sets whether the form should be initialized automatically.
7+
Forall fields, this option shouldonly be ``true``for root forms. You won't
8+
need to change this option and probably won't needto worry about it.

‎reference/forms/types/options/button_auto_initialize.rst.inc

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp