Update TranslationCollectionFormListener.php

Method hasParent() in FormType is deprecated and removed.
This commit is contained in:
Yordan Lazarov 2015-08-09 15:03:17 +03:00
parent 0852bf835e
commit 468fab3c6f

View file

@ -81,8 +81,7 @@ class TranslationCollectionFormListener implements EventSubscriberInterface
if (method_exists($rootData, $addFunction)) { if (method_exists($rootData, $addFunction)) {
$foundData = true; $foundData = true;
break; break;
} elseif ($currentForm->hasParent()) { } elseif (null != ($currentForm = $currentForm->getParent())) {
$currentForm = $currentForm->getParent();
$rootData = $currentForm->getData(); $rootData = $currentForm->getData();
} else { } else {
break; break;