From 46b77928f746a4231d064774b5b67fd892c7ce86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sun, 4 Aug 2013 17:50:34 +0200 Subject: rm vendor --- .../Form/Extension/Core/Type/TimezoneType.php | 86 ---------------------- 1 file changed, 86 deletions(-) delete mode 100644 vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php (limited to 'vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php') diff --git a/vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php b/vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php deleted file mode 100644 index cd4a2ad3..00000000 --- a/vendor/symfony/form/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Form\Extension\Core\Type; - -use Symfony\Component\Form\AbstractType; -use Symfony\Component\OptionsResolver\OptionsResolverInterface; - -class TimezoneType extends AbstractType -{ - /** - * Stores the available timezone choices - * @var array - */ - private static $timezones; - - /** - * {@inheritdoc} - */ - public function setDefaultOptions(OptionsResolverInterface $resolver) - { - $resolver->setDefaults(array( - 'choices' => self::getTimezones(), - )); - } - - /** - * {@inheritdoc} - */ - public function getParent() - { - return 'choice'; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'timezone'; - } - - /** - * Returns the timezone choices. - * - * The choices are generated from the ICU function - * \DateTimeZone::listIdentifiers(). They are cached during a single request, - * so multiple timezone fields on the same page don't lead to unnecessary - * overhead. - * - * @return array The timezone choices - */ - public static function getTimezones() - { - if (null === static::$timezones) { - static::$timezones = array(); - - foreach (\DateTimeZone::listIdentifiers() as $timezone) { - $parts = explode('/', $timezone); - - if (count($parts) > 2) { - $region = $parts[0]; - $name = $parts[1].' - '.$parts[2]; - } elseif (count($parts) > 1) { - $region = $parts[0]; - $name = $parts[1]; - } else { - $region = 'Other'; - $name = $parts[0]; - } - - static::$timezones[$region][$timezone] = str_replace('_', ' ', $name); - } - } - - return static::$timezones; - } -} -- cgit v1.2.3