From 520e3761e93c39002eb52e1b431b5e73e8759c1a Mon Sep 17 00:00:00 2001 From: Bernhard Schussek Date: Wed, 18 May 2011 22:34:34 +0200 Subject: [PATCH] [Form] Removed unused option "pattern" of date and time type --- .../Component/Form/Extension/Core/Type/DateTimeType.php | 8 -------- .../Component/Form/Extension/Core/Type/DateType.php | 1 - .../Component/Form/Extension/Core/Type/TimeType.php | 1 - 3 files changed, 10 deletions(-) diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php index 992014396fc2..3558807c9ad9 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php @@ -37,9 +37,6 @@ public function buildForm(FormBuilder $builder, array $options) 'with_seconds', ))); - if (isset($options['date_pattern'])) { - $dateOptions['pattern'] = $options['date_pattern']; - } if (isset($options['date_widget'])) { $dateOptions['widget'] = $options['date_widget']; } @@ -49,9 +46,6 @@ public function buildForm(FormBuilder $builder, array $options) $dateOptions['input'] = 'array'; - if (isset($options['time_pattern'])) { - $timeOptions['pattern'] = $options['time_pattern']; - } if (isset($options['time_widget'])) { $timeOptions['widget'] = $options['time_widget']; } @@ -103,10 +97,8 @@ public function getDefaultOptions(array $options) // Don't modify \DateTime classes by reference, we treat // them like immutable value objects 'by_reference' => false, - 'date_pattern' => null, 'date_widget' => null, 'date_format' => null, - 'time_pattern' => null, 'time_widget' => null, /* Defaults for date field */ 'years' => range(date('Y') - 5, date('Y') + 5), diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php index cd84a56b3a4f..e095c0ddedba 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php @@ -119,7 +119,6 @@ public function getDefaultOptions(array $options) 'days' => range(1, 31), 'widget' => 'choice', 'input' => 'datetime', - 'pattern' => null, 'format' => \IntlDateFormatter::MEDIUM, 'data_timezone' => null, 'user_timezone' => null, diff --git a/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php b/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php index de43577a2e34..44a8dec2f081 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php @@ -94,7 +94,6 @@ public function getDefaultOptions(array $options) 'widget' => 'choice', 'input' => 'datetime', 'with_seconds' => false, - 'pattern' => null, 'data_timezone' => null, 'user_timezone' => null, 'csrf_protection' => false,