Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Documented the "labels" option of DateIntervalType #7400

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions reference/forms/types/dateinterval.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ or an array (see `input`_).
| | - `seconds`_ |
| | - `weeks`_ |
| | - `input`_ |
| | - `labels`_ |
| | - `placeholder`_ |
| | - `widget`_ |
| | - `with_days`_ |
Expand Down Expand Up @@ -128,6 +129,28 @@ your underlying object. Valid values are:
The value that comes back from the form will also be normalized back into
this format.

labels
~~~~~~

.. versionadded:: 3.3
The ``labels`` option was introduced in Symfony 3.3.

**type**: ``array`` **default**: (see below)

The labels displayed for each of the elements of this type. The default values
are ``null``, so they display the "humanized version" of the child names (``Invert``,
``Years``, etc.)::

'labels' => array(
'invert' => null,
'years' => null,
'months' => null,
'days' => null,
'hours' => null,
'minutes' => null,
'seconds' => null,
)

minutes
~~~~~~~

Expand Down