|
@@ -12,6 +12,7 @@
|
|
|
namespace Sonata\AdminBundle\Form\Type;
|
|
|
|
|
|
use Symfony\Component\Form\AbstractType;
|
|
|
+use Symfony\Component\HttpKernel\Kernel;
|
|
|
|
|
|
/**
|
|
|
* This type wrap native `collection` form type and render `add` and `delete`
|
|
@@ -26,7 +27,11 @@ class CollectionType extends AbstractType
|
|
|
*/
|
|
|
public function getParent()
|
|
|
{
|
|
|
- return 'collection';
|
|
|
+ if (version_compare(Kernel::VERSION, '2.8.0', '>=')) {
|
|
|
+ return 'Symfony\Component\Form\Extension\Core\Type\CollectionType';
|
|
|
+ } else {
|
|
|
+ return 'collection';
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|