bug #28508 [Form] forward false label option to nested types (xabbuh)

This PR was merged into the 2.8 branch.

Discussion
----------

[Form] forward false label option to nested types

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/28469#discussion_r217880630
| License       | MIT
| Doc PR        |

This change does not fix any built-in Symfony form themes, but takes
into account the changes made in #28469 to allow third-party form themes
work properly.

Commits
-------

3247cdeea9 forward false label option to nested types
This commit is contained in:
Nicolas Grekas 2018-09-20 14:21:23 +02:00
commit 5a10f2de9e

View File

@ -121,6 +121,11 @@ class DateTimeType extends AbstractType
'invalid_message_parameters',
)));
if (false === $options['label']) {
$dateOptions['label'] = false;
$timeOptions['label'] = false;
}
if (null !== $options['date_widget']) {
$dateOptions['widget'] = $options['date_widget'];
}