Update to the "Upgrade to v2.1" documentation: the way HTML attributes are passed for the form_label
function has changed.
This commit is contained in:
parent
8680571df0
commit
f6f1bb5e02
@ -191,7 +191,7 @@
|
||||
implementations of this interface to reflect this change.
|
||||
|
||||
* The `UserPassword` constraint has moved from the Security Bundle to the Security Component:
|
||||
|
||||
|
||||
Before:
|
||||
|
||||
```
|
||||
@ -636,6 +636,20 @@
|
||||
`getChoices()` and `getChoicesByValues()`. For the latter two, no
|
||||
replacement exists.
|
||||
|
||||
* HTML attributes are now passed in the `label_attr` variable for the `form_label` function instead of `attr`.
|
||||
|
||||
Before:
|
||||
|
||||
```
|
||||
{{ form_label(form.name, 'Your Name', { 'attr': {'class': 'foo'} }) }}
|
||||
```
|
||||
|
||||
After:
|
||||
|
||||
```
|
||||
{{ form_label(form.name, 'Your Name', { 'label_attr': {'class': 'foo'} }) }}
|
||||
```
|
||||
|
||||
* `EntitiesToArrayTransformer` and `EntityToIdTransformer` were removed.
|
||||
The former was replaced by `CollectionToArrayTransformer` in combination
|
||||
with `EntityChoiceList`, the latter is not required in the core anymore.
|
||||
|
Reference in New Issue
Block a user