浏览代码

[Form] Removing excess option in the TimezoneType

Ryan Weaver 14 年之前
父节点
当前提交
df50e2b161
共有 1 个文件被更改,包括 2 次插入10 次删除
  1. 2 10
      src/Symfony/Component/Form/Type/TimezoneType.php

+ 2 - 10
src/Symfony/Component/Form/Type/TimezoneType.php

@@ -18,17 +18,9 @@ class TimezoneType extends AbstractType
 {
     public function getDefaultOptions(array $options)
     {
-        $defaultOptions = array(
-            'preferred_choices' => array(),
+        return array(
+            'choice_list' => new TimezoneChoiceList(),
         );
-
-        $options = array_replace($defaultOptions, $options);
-
-        if (!isset($options['choice_list'])) {
-            $defaultOptions['choice_list'] = new TimezoneChoiceList();
-        }
-
-        return $defaultOptions;
     }
 
     public function getParent(array $options)