From f6f1bb5e02ee310c0b85b3003ab924ce07ca84e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Perrin?= Date: Mon, 9 Jul 2012 17:14:03 +0200 Subject: [PATCH] Update to the "Upgrade to v2.1" documentation: the way HTML attributes are passed for the `form_label` function has changed. --- UPGRADE-2.1.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/UPGRADE-2.1.md b/UPGRADE-2.1.md index 4adb6eeee7..61a6d7593d 100644 --- a/UPGRADE-2.1.md +++ b/UPGRADE-2.1.md @@ -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.