This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Form
Fabien Potencier be2e67c1ab merged branch bschussek/issue3288 (PR #3290)
Commits
-------

22c8f80 [Form] Fixed issues mentioned in the PR comments
3b1b570 [Form] Fixed: The "date", "time" and "datetime" types can be initialized with \DateTime objects
88ef52d [Form] Improved FormType::getDefaultOptions() to see default options defined in parent types
b9facfc [Form] Removed undefined variables in exception constructor

Discussion
----------

[Form] Fixed: "date", "time" and "datetime" fields can be initialized with \DateTime objects

Bug fix: yes
Feature addition: yes
Backwards compatibility break: **yes**
Symfony2 tests pass: yes
Fixes the following tickets: #3288
Todo: -

![Travis Build Status](https://secure.travis-ci.org/bschussek/symfony.png?branch=issue3288)

Fixed exception that was thrown when doing:

    $builder->add('createdAt', 'date', array('data' => new \DateTime()));

On a side note, the options passed to `FieldType::getDefaultOptions` now always also contain the default options of any parent types. This is necessary if you want to be independent of how `getDefaultOptions` is implemented in the parent type and still rely on the already defined values.

As a result, `FieldType::getParent` doesn't see default options anymore. This shouldn't be a big problem, because this method only relies on options in few cases. If it does, options now need to be checked for existence with `isset` before being used (BC break).

---------------------------------------------------------------------------

by bschussek at 2012-02-09T16:14:46Z

@fabpot Ready to merge.

---------------------------------------------------------------------------

by bschussek at 2012-02-10T12:15:04Z

@fabpot Ready to merge
2012-02-10 13:16:49 +01:00
..
Event fixed CS 2011-06-08 12:16:48 +02:00
Exception [Form] Greatly improved ChoiceListInterface and all of its implementations 2012-01-23 18:28:25 +01:00
Extension merged branch bschussek/issue3288 (PR #3290) 2012-02-10 13:16:49 +01:00
Guess [Form] Added constant Guess::VERY_HIGH_CONFIDENCE 2012-02-10 12:01:35 +01:00
Resources/config [Form] Made validation of form children configurable. Set the option "cascade_validation" to true if you need it. 2012-01-16 20:49:43 +01:00
Util [Form] Fixed MergeCollectionListener when used with a custom property path 2012-02-09 18:29:42 +01:00
AbstractExtension.php Remove useless code 2011-07-04 14:08:20 +02:00
AbstractType.php [Form] Fixed a typo in AbstractType phpdoc 2011-08-13 13:43:13 +02:00
AbstractTypeExtension.php Merge branch 'master' into form-phpdoc-2 2011-05-15 19:24:09 +02:00
CallbackTransformer.php [Various] Fixed errors on PHPDocs exception names (TransformationFailedException) 2011-08-09 00:14:29 +02:00
CallbackValidator.php fixed CS 2011-06-08 12:16:48 +02:00
composer.json Revert "merged 2.0" 2012-01-08 20:43:02 +01:00
DataMapperInterface.php fixed CS 2011-06-08 12:16:48 +02:00
DataTransformerInterface.php [Various] Fixed errors on PHPDocs exception names (TransformationFailedException) 2011-08-09 00:14:29 +02:00
Form.php [Form] Fixed Form::bindRequest() when used on a form without children 2012-02-10 10:36:16 +01:00
FormBuilder.php [Form] Fixed read_only attribute for expanded fields 2012-02-03 11:49:06 +02:00
FormError.php [Form] Added FormError::getMessage() and use it in Form class 2011-11-29 18:26:32 +01:00
FormEvents.php removed the ON_ prefix for Form event names 2011-05-31 07:19:18 +02:00
FormExtensionInterface.php [Form] phpDoc 2011-05-13 11:00:04 +02:00
FormFactory.php [Form] Improved FormType::getDefaultOptions() to see default options defined in parent types 2012-02-07 10:51:21 +01:00
FormFactoryInterface.php [Form] added support for parent of FormBuilder 2012-02-02 10:09:50 +01:00
FormInterface.php [Form] read_only and disabled attributes 2012-01-31 11:51:22 +02:00
FormTypeExtensionInterface.php fixed CS 2011-06-08 12:16:48 +02:00
FormTypeGuesserChain.php fixed CS 2011-06-08 12:16:48 +02:00
FormTypeGuesserInterface.php [DoctrineBridge] fixed some CS 2011-12-13 10:22:12 +01:00
FormTypeInterface.php fixed CS 2011-06-08 12:16:48 +02:00
FormValidatorInterface.php fixed CS 2011-06-08 12:16:48 +02:00
FormView.php [DoctrineBridge] fixed some CS 2011-12-13 10:22:12 +01:00
LICENSE added LICENSE files for the subtree repositories 2011-02-22 18:58:15 +01:00
README.md tweaked the README files 2011-12-18 14:22:28 +01:00
ReversedTransformer.php [Form] Fix the ReversedTransform class 2011-05-10 20:25:22 +02:00

Form Component

Form provides tools for defining forms, rendering and binding request data to related models. Furthermore it provides integration with the Validation component.

Resources

Silex integration:

https://github.com/fabpot/Silex/blob/master/src/Silex/Provider/FormServiceProvider.php

Unit tests:

https://github.com/symfony/symfony/tree/master/tests/Symfony/Tests/Component/Form

Documentation:

http://symfony.com/doc/2.0/book/forms.html