소스 검색

[Form] PercentField fixed option collision

GordonsLondon 14 년 전
부모
커밋
bfae4ad86c
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      src/Symfony/Component/Form/PercentField.php

+ 4 - 2
src/Symfony/Component/Form/PercentField.php

@@ -28,12 +28,14 @@ class PercentField extends NumberField
      */
     protected function configure()
     {
+        parent::configure();
+
         $this->addOption('precision', 0);
-        $this->addOption('type', self::FRACTIONAL);
+        $this->addOption('percent_type', self::FRACTIONAL);
 
         $this->setValueTransformer(new PercentToLocalizedStringTransformer(array(
             'precision' => $this->getOption('precision'),
-            'type' => $this->getOption('type'),
+            'type' => $this->getOption('percent_type'),
         )));
     }
 }