8000 Extracted the common "data_class" option explanation for data-related… · symfony/symfony-docs@48b402b · GitHub
[go: up one dir, main page]

Skip to content

Commit 48b402b

Browse files
committed
Extracted the common "data_class" option explanation for data-related types
1 parent f44e971 commit 48b402b

File tree

4 files changed

+34
-16
lines changed
  • options
  • 4 files changed

    +34
    -16
    lines changed

    reference/forms/types/date.rst

    Lines changed: 1 addition & 8 deletions
    Original file line numberDiff line numberDiff line change
    @@ -129,14 +129,7 @@ The ``DateTime`` classes are treated as immutable objects.
    129129

    130130
    .. include:: /reference/forms/types/options/compound_type.rst.inc
    131131

    132-
    data_class
    133-
    ~~~~~~~~~~
    134-
    135-
    **default**: ``null``
    136-
    137-
    The internal normalized representation of this type is an array, not a ``\DateTime``
    138-
    object. Therefore, the ``data_class`` option is initialized to ``null`` to avoid
    139-
    the ``FormType`` object from initializing it to ``\DateTime``.
    132+
    .. include:: /reference/forms/types/options/data_class_date.rst.inc
    140133

    141134
    error_bubbling
    142135
    ~~~~~~~~~~~~~~

    reference/forms/types/datetime.rst

    Lines changed: 24 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -15,6 +15,11 @@ the data can be a ``DateTime`` object, a string, a timestamp or an array.
    1515
    +----------------------+-----------------------------------------------------------------------------+
    1616
    | Rendered as | single text box or three select fields |
    1717
    +----------------------+-----------------------------------------------------------------------------+
    18+
    | Overridden Options | - `by_reference`_ |
    19+
    | | - `compound`_ |
    20+
    | | - `data_class`_ |
    21+
    | | - `error_bubbling`_ |
    22+
    +----------------------+-----------------------------------------------------------------------------+
    1823
    | Options | - `date_format`_ |
    1924
    | | - `date_widget`_ |
    2025
    | | - `days`_ |
    @@ -46,6 +51,25 @@ the data can be a ``DateTime`` object, a string, a timestamp or an array.
    4651
    | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\DateTimeType` |
    4752
    +----------------------+-----------------------------------------------------------------------------+
    4853

    54+
    Overridden Options
    55+
    ------------------
    56+
    57+
    by_reference
    58+
    ~~~~~~~~~~~~
    59+
    60+
    **default**: ``false``
    61+
    62+
    The ``DateTime`` classes are treated as immutable objects.
    63+
    64+
    .. include:: /reference/forms/types/options/compound_type.rst.inc
    65+
    66+
    .. include:: /reference/forms/types/options/data_class_date.rst.inc
    67+
    68+
    error_bubbling
    69+
    ~~~~~~~~~~~~~~
    70+
    71+
    **default**: ``false``
    72+
    4973
    Field Options
    5074
    -------------
    5175

    Lines changed: 8 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -0,0 +1,8 @@
    1+
    data_class
    2+
    ~~~~~~~~~~
    3+
    4+
    **default**: ``null``
    5+
    6+
    The internal normalized representation of this type is an array, not a ``\DateTime``
    7+
    object. Therefore, the ``data_class`` option is initialized to ``null`` to avoid
    8+
    the ``FormType`` object from initializing it to ``\DateTime``.

    reference/forms/types/time.rst

    Lines changed: 1 addition & 8 deletions
    Original file line numberDiff line numberDiff line change
    @@ -143,14 +143,7 @@ The ``DateTime`` classes are treated as immutable objects.
    143143

    144144
    .. include:: /reference/forms/types/options/compound_type.rst.inc
    145145

    146-
    data_class
    147-
    ~~~~~~~~~~
    148-
    149-
    **default**: ``null``
    150-
    151-
    The internal normalized representation of this type is an array, not a ``\DateTime``
    152-
    object. Therefore, the ``data_class`` option is initialized to ``null`` to avoid
    153-
    the ``FormType`` object from initializing it to ``\DateTime``.
    146+
    .. include:: /reference/forms/types/options/data_class_date.rst.inc
    154147

    155148
    error_bubbling
    156149
    ~~~~~~~~~~~~~~

    0 commit comments

    Comments
     (0)
    0