Skip to content

Commit e41b3cc

Browse files
committed
Documented overridden options for "file" type
1 parent 8e825d9 commit e41b3cc

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

reference/forms/types/file.rst

+24
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ The ``file`` type represents a file input in your form.
99
+-------------+---------------------------------------------------------------------+
1010
| Rendered as | ``input`` ``file`` field |
1111
+-------------+---------------------------------------------------------------------+
12+
| Overridden | - `compound`_ |
13+
| Options | - `data_class`_ |
14+
| | - `empty_data`_ |
15+
+-------------+---------------------------------------------------------------------+
1216
| Inherited | - `disabled`_ |
1317
| options | - `empty_data`_ |
1418
| | - `error_bubbling`_ |
@@ -24,6 +28,26 @@ The ``file`` type represents a file input in your form.
2428
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\FileType` |
2529
+-------------+---------------------------------------------------------------------+
2630

31+
Overridden Options
32+
------------------
33+
34+
.. include:: /reference/forms/types/options/compound_type.rst.inc
35+
36+
data_class
37+
~~~~~~~~~~
38+
39+
**default**: :class:`Symfony\\Component\\HttpFoundation\\File\\File`
40+
41+
This option sets the appropriate file-realted data mapper to be used by the type.
42+
43+
empty_data
44+
~~~~~~~~~~
45+
46+
**default**: ``null``
47+
48+
This option is set to ``null`` automatically because it is not used by the
49+
renderd field widget.
50+
2751
Basic Usage
2852
-----------
2953

0 commit comments

Comments
 (0)