Bernhard Schussek
7a63b840f3
[Form] Renamed submit() to bind()
2011-03-17 14:55:26 +01:00
Bernhard Schussek
50ce0d53a0
[Form] Removed FieldInterface::getDisplayedData(). Use getTransformedData() instead
2011-03-17 14:28:59 +01:00
Bernhard Schussek
0bf566310c
Merge branch 'event-manager' into experimental
...
Conflicts:
src/Symfony/Component/Form/BirthdayField.php
src/Symfony/Component/Form/CheckboxField.php
src/Symfony/Component/Form/ChoiceField.php
src/Symfony/Component/Form/ChoiceList/TimeZoneChoiceList.php
src/Symfony/Component/Form/CollectionField.php
src/Symfony/Component/Form/DateField.php
src/Symfony/Component/Form/DateTimeField.php
src/Symfony/Component/Form/EntityChoiceField.php
src/Symfony/Component/Form/Events.php
src/Symfony/Component/Form/FieldFactory/FieldFactory.php
src/Symfony/Component/Form/FieldFactory/FieldFactoryInterface.php
src/Symfony/Component/Form/FileField.php
src/Symfony/Component/Form/Filters.php
src/Symfony/Component/Form/FormContext.php
src/Symfony/Component/Form/FormContextInterface.php
src/Symfony/Component/Form/FormFactoryInterface.php
src/Symfony/Component/Form/HybridField.php
src/Symfony/Component/Form/IntegerField.php
src/Symfony/Component/Form/LanguageField.php
src/Symfony/Component/Form/LocaleField.php
src/Symfony/Component/Form/MoneyField.php
src/Symfony/Component/Form/NumberField.php
src/Symfony/Component/Form/PasswordField.php
src/Symfony/Component/Form/PercentField.php
src/Symfony/Component/Form/RepeatedField.php
src/Symfony/Component/Form/TextField.php
src/Symfony/Component/Form/TimeField.php
src/Symfony/Component/Form/ToggleField.php
src/Symfony/Component/Form/UrlField.php
src/Symfony/Component/HttpFoundation/File/UploadedFile.php
tests/Symfony/Tests/Component/Form/FileFieldTest.php
tests/Symfony/Tests/Component/Form/FormContextTest.php
tests/Symfony/Tests/Component/Form/HiddenFieldTest.php
2011-03-13 21:04:24 +01:00
Fabien Potencier
8c423edfef
replaced symfony-project.org by symfony.com
2011-03-06 12:40:06 +01:00
Bernhard Schussek
8a6246bd06
[Form] Refactored contents of FormFactory into individual FieldConfig classes
2011-03-02 12:20:30 +01:00
Bernhard Schussek
528ef55da6
[Form] Implemented generic data filter hooks
...
You can now modify set or bound data by adding a filter for either of the following events:
* Filters::filterBoundDataFromClient
* Filters::filterBoundData
* Filters::filterSetData
2011-03-01 14:19:28 +01:00
Bernhard Schussek
0f8a413221
[Form] Fixed EntityChoiceFieldTest
2011-02-24 16:26:57 +01:00
Bernhard Schussek
e3e8c29875
Merge branch 'bugfix' into experimental
...
Conflicts:
src/Symfony/Component/Form/EntityChoiceField.php
src/Symfony/Component/Form/Field.php
src/Symfony/Component/Form/HybridField.php
tests/Symfony/Tests/Component/Form/FieldTest.php
tests/Symfony/Tests/Component/Form/FormTest.php
2011-02-24 13:17:53 +01:00
Bernhard Schussek
87e6cbf8f0
[Form] Fixed: PropertyPath always requires arrays or objects. Forms now always store arrays or objects as transformed data, even when they were bound empty
2011-02-24 12:22:00 +01:00
Bernhard Schussek
a40e2dd77b
[Form] Deleted obsolete Field classes, ported some more to FormFactory and fixed lots of failing tests
2011-02-23 14:11:18 +01:00
Bernhard Schussek
7a48c0a5c5
[Form] Refactored logic from ChoiceField into ChoicePlugin and SelectMultipleNamePlugin
2011-02-23 14:11:18 +01:00
Bernhard Schussek
813ec54fa1
[Form] Refactored parts of the choice fields into ChoiceList instances
2011-02-23 14:11:17 +01:00
Bernhard Schussek
fb1f99137d
[Form] Changed semantics of a "bound" form
...
A form now always has to be bound, independent of whether the request is a POST request or not. The bind() method detects itself whether the request was a post request or not and reads its data accordingly. The "old" bind()/isBound() methods were renamed to submit()/isSubmitted().
$form = new Form('author');
$form->bind($request, $author);
if ($form->isValid()) {
// isValid() implies isSubmitted(), non-submitted forms can
// never be valid
// do something with author now
}
Alternatively, you can only bind global variables, if you don't have a request object.
$form->bindGlobals($author);
Note that the $author object is in both cases optional. You can also pass no object at all and read the data using $form->getData(), but then no validation will occur. You can also prefill the form with an object during instantiation.
$form = new Form('author', array('data' => $author));
$form->bind($request);
// etc.
2011-02-01 15:27:12 +01:00
Bernhard Schussek
d152b5e265
[Form] Moved Doctrine2 specific files
2011-02-01 15:27:12 +01:00