Skip to content

Commit 6b087ee

Browse files
committed
[#2107] Fixing a few more references to the old "virtual" option and adding some versionadded details
1 parent b7bb147 commit 6b087ee

File tree

8 files changed

+26
-19
lines changed

8 files changed

+26
-19
lines changed

cookbook/form/inherit_data_option.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
.. index::
22
single: Form; The "inherit_data" option
33

4-
Reducing Code Duplication with "inherit_data"
5-
=============================================
4+
How to Reduce Code Duplication with "inherit_data"
5+
==================================================
6+
7+
.. versionadded:: 2.3
8+
This ``inherit_data`` option was known as ``virtual`` before Symfony 2.3.
69

710
The ``inherit_data`` form field option can be very useful when you have some
811
duplicated fields in different entities. For example, imagine you have two

reference/forms/types/birthday.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ option defaults to 120 years ago to the current year.
3333
| | - `invalid_message_parameters`_ |
3434
| | - `read_only`_ |
3535
| | - `disabled`_ |
36-
| | - `virtual`_ |
36+
| | - `inherit_data`_ |
3737
+----------------------+-------------------------------------------------------------------------------+
3838
| Parent type | :doc:`date</reference/forms/types/date>` |
3939
+----------------------+-------------------------------------------------------------------------------+
@@ -82,4 +82,4 @@ These options inherit from the :doc:`date</reference/forms/types/field>` type:
8282

8383
These options inherit from the :doc:`date</reference/forms/types/form>` type:
8484

85-
.. include:: /reference/forms/types/options/virtual.rst.inc
85+
.. include:: /reference/forms/types/options/inherit_data.rst.inc

reference/forms/types/choice.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ option.
2525
| | - `read_only`_ |
2626
| | - `disabled`_ |
2727
| | - `error_bubbling`_ |
28-
| | - `virtual`_ |
28+
| | - `inherit_data`_ |
2929
| | - `by_reference`_ |
3030
| | - `empty_data`_ |
3131
+-------------+-----------------------------------------------------------------------------+
@@ -122,7 +122,7 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:
122122

123123
These options inherit from the :doc:`date</reference/forms/types/form>` type:
124124

125-
.. include:: /reference/forms/types/options/virtual.rst.inc
125+
.. include:: /reference/forms/types/options/inherit_data.rst.inc
126126

127127
.. include:: /reference/forms/types/options/by_reference.rst.inc
128128

reference/forms/types/date.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ day, and year) or three select boxes (see the `widget_` option).
3636
| options | - `invalid_message_parameters`_ |
3737
| | - `read_only`_ |
3838
| | - `disabled`_ |
39-
| | - `virtual`_ |
39+
| | - `inherit_data`_ |
4040
+----------------------+-----------------------------------------------------------------------------+
4141
| Parent type | ``field`` (if text), ``form`` otherwise |
4242
+----------------------+-----------------------------------------------------------------------------+
@@ -146,4 +146,4 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:
146146

147147
These options inherit from the :doc:`date</reference/forms/types/form>` type:
148148

149-
.. include:: /reference/forms/types/options/virtual.rst.inc
149+
.. include:: /reference/forms/types/options/inherit_data.rst.inc

reference/forms/types/datetime.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ data can be a ``DateTime`` object, a string, a timestamp or an array.
3333
| options | - `invalid_message_parameters`_ |
3434
| | - `read_only`_ |
3535
| | - `disabled`_ |
36-
| | - `virtual`_ |
36+
| | - `inherit_data`_ |
3737
+----------------------+-----------------------------------------------------------------------------+
3838
| Parent type | :doc:`form</reference/forms/types/form>` |
3939
+----------------------+-----------------------------------------------------------------------------+
@@ -115,4 +115,4 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:
115115

116116
These options inherit from the :doc:`date</reference/forms/types/form>` type:
117117

118-
.. include:: /reference/forms/types/options/virtual.rst.inc
118+
.. include:: /reference/forms/types/options/inherit_data.rst.inc
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
inherit_data
2+
~~~~~~~~~~~~
3+
4+
.. versionadded:: 2.3
5+
This option was known as ``virtual`` before Symfony 2.3.
6+
7+
**type**: ``boolean`` **default**: ``false``
8+
9+
This option determines if the form will inherit data form its parent form.
10+
This can be useful is you have a set of fields that are duplicated across
11+
multiple forms. See :doc:`/cookbook/form/inherit_data_option`.

reference/forms/types/options/virtual.rst.inc

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

reference/forms/types/time.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ as a ``DateTime`` object, a string, a timestamp or an array.
3131
| options | - `invalid_message_parameters`_ |
3232
| | - `read_only`_ |
3333
| | - `disabled`_ |
34-
| | - `virtual`_ |
34+
| | - `inherit_data`_ |
3535
+----------------------+-----------------------------------------------------------------------------+
3636
| Parent type | form |
3737
+----------------------+-----------------------------------------------------------------------------+
@@ -144,4 +144,4 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:
144144

145145
These options inherit from the :doc:`date</reference/forms/types/form>` type:
146146

147-
.. include:: /reference/forms/types/options/virtual.rst.inc
147+
.. include:: /reference/forms/types/options/inherit_data.rst.inc

0 commit comments

Comments
 (0)