소스 검색

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,