فهرست منبع

Use fully qualified checkbox type (#4628)

Bruno Galeotti 7 سال پیش
والد
کامیت
bd87ed2f22
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      Form/Type/AdminType.php

+ 4 - 1
Form/Type/AdminType.php

@@ -119,7 +119,10 @@ class AdminType extends AbstractType
                 return $options['btn_delete'] !== false;
             },
             'delete_options' => array(
-                'type' => 'checkbox',
+                // NEXT_MAJOR: Remove ternary (when requirement of Symfony is >= 2.8)
+                'type' => method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix')
+                    ? 'Symfony\Component\Form\Extension\Core\Type\CheckboxType'
+                    : 'checkbox',
                 'type_options' => array(
                     'required' => false,
                     'mapped' => false,