merged branch sterrien/patch-1 (PR #5842)
This PR was merged into the 2.0 branch.
Commits
-------
2d9a6fc
Use Norm Data instead of Data
Discussion
----------
[Form] Use Norm Data instead of App Data
This listener is triggered when normalized data are binded.
We have to use $event->getForm()->getNormData() instead of $event->getForm()->getData().
I have made a new FormType having 'entity' as parent and having a NormTransformer. I encountered a problem in MergeCollectionListener when the request is binded.
My commit fix it.
This commit is contained in:
commit
6831a3d1c5
@ -33,7 +33,7 @@ class MergeCollectionListener implements EventSubscriberInterface
|
|||||||
|
|
||||||
public function onBindNormData(FilterDataEvent $event)
|
public function onBindNormData(FilterDataEvent $event)
|
||||||
{
|
{
|
||||||
$collection = $event->getForm()->getData();
|
$collection = $event->getForm()->getNormData();
|
||||||
$data = $event->getData();
|
$data = $event->getData();
|
||||||
|
|
||||||
if (!$collection) {
|
if (!$collection) {
|
||||||
|
Reference in New Issue
Block a user