Bernhard Schussek
a97366fbcb
[Form] Split signature of FormFactory::create() into create() and createNamed()
...
The data can now be passed to all creation methods:
$form = $factory->create('form', $data);
By default, a form will receive the name of its type ("form" in above example). If you wish to pass a custom name, use createNamed():
$form = $factory->createNamed('form', 'myform', $data);
2011-04-22 10:42:21 +02:00
Bernhard Schussek
e3db366116
[Form] Passing FormFactory to FormBuilder in its constructor
2011-04-14 15:25:30 +02:00
Bernhard Schussek
e476231e8a
[Form] Removed invalid tests, cleaned up some tests, added test coverage
2011-04-06 15:58:53 +02:00
Bernhard Schussek
a5d0b3aea6
[Form] Changed FormBuilder::set(Client|Norm)Transformer to FormBuilder::prepend(Client|Norm)Transformer and FormBuilder::append(Client|Norm)Transformer to facilitate extension of types
2011-04-02 16:39:19 +02:00
Bernhard Schussek
33b0011f86
[Form] Improved test coverage of Form
2011-04-02 11:22:29 +02:00
Bernhard Schussek
c864d7fae1
[Form] Improved test coverage of Form class
2011-03-31 15:23:33 +02:00
Bernhard Schussek
1ef18360fa
[Form] Made name immutable in FormBuilder to avoid synchronization problems with name and property path
2011-03-31 13:48:06 +02:00
Bernhard Schussek
b180319371
[Form] Moved creation of empty data to Form to clean up DataMapperInterface
2011-03-27 15:12:35 +02:00
Bernhard Schussek
6588a47ba7
[Form] Removed FormBuilder::setDataClass(). Use the FieldType option "data_class" instead.
...
The problem was that "data_class" was used in two places: FormBuilder::build() and PropertyPathMapper.
PropertyPathMapper was already constructed during FormType::buildForm(), so any data class changes made to the FormBuilder wouldn't affect the data class of the PropertyPathMapper anymore and so lead to an inconsistent state.
2011-03-27 14:34:48 +02:00
Bernhard Schussek
364b0f5208
[Form] Fixed: FormBuilder::add() accepts FormTypeInterface instances
2011-03-27 14:05:06 +02:00
Bernhard Schussek
c786fac303
[Form] Sample fix implementation of renderers
2011-03-26 16:03:34 +01:00
Bernhard Schussek
9b1b8cbffa
[Form] Replaced various occurences of 'field' by 'form'
2011-03-25 02:12:01 +01:00
Bernhard Schussek
15d5259eb8
[Form] Forms now remember the types used during their construction
2011-03-24 16:16:31 +01:00
Bernhard Schussek
577e106361
[Form] Implemented custom mapping of data errors to form fields
2011-03-22 01:15:48 +01:00
Bernhard Schussek
87665bc380
[Form] Decoupled FormBuilder from CSRF protection
2011-03-21 22:41:19 +01:00
Bernhard Schussek
c1abf08d9c
[Form] Implemented error bubbling
2011-03-21 22:13:02 +01:00
Bernhard Schussek
01a47457d0
[Form] Improved naming of various interfaces. Renamed DefaultRenderer to ThemeRenderer
2011-03-21 20:57:38 +01:00
Bernhard Schussek
321d40b21a
[Form] Decoupled FormBuilder from ThemeInterface
2011-03-21 20:46:43 +01:00
Bernhard Schussek
119866e06d
[Form] Renamed FormBuilder::getInstance() to getForm()
2011-03-20 15:17:25 +01:00
Bernhard Schussek
2dbb41714a
[Form] Merged Field and Form. Merged FieldBuilder and FormBuilder. After the refactoring, the distinction between the two concepts is small enough to merge them
2011-03-20 13:35:19 +01:00
Bernhard Schussek
fc7281bcab
[Form] Extracted validation logic of form. Fields can now contain multiple validators
2011-03-20 12:00:19 +01:00
Bernhard Schussek
cb599f417e
[Form] Renamed field option 'disabled' to 'read_only'. How to render read-only fields is now the responsibility of the renderer
2011-03-20 10:35:16 +01:00
Bernhard Schussek
2c6c89d898
Merge remote branch 'beberlei/forms' into beberlei-merge
2011-03-20 10:15:59 +01:00
Benjamin Eberlei
b43318ee3e
[Form] Add tests for untested classes.
2011-03-19 22:03:49 +01:00
Bernhard Schussek
fb2db58801
[Form] Added fluid interface for inline adding of sub-builders to a builder
2011-03-19 19:44:45 +01:00
Bernhard Schussek
6793bcd698
[Form] Removed magic from method signature of add()
2011-03-19 19:20:55 +01:00
Bernhard Schussek
c4b7a77ece
Merge remote branch 'beberlei/forms' into beberlei-merge
...
Conflicts:
src/Symfony/Component/Form/Type/Loader/DefaultTypeLoader.php
2011-03-19 19:01:57 +01:00
Bernhard Schussek
0259d4da1e
[Form] Moved namespace DataValidator to Validator
2011-03-19 16:54:07 +01:00
Benjamin Eberlei
32e1a7c8f9
Merge bschussek/experimental into branch forms.
2011-03-19 15:18:52 +01:00
Bernhard Schussek
3e17b26105
[Form] Moved CSRF protection into separate field
2011-03-19 15:06:54 +01:00
Benjamin Eberlei
3e2b8e5f12
Fix some missing use statements and small bugs.
2011-03-19 14:31:25 +01:00
Bernhard Schussek
6bc79a1a12
[Form] Renamed different kinds of data transformers within a field for better clarity
2011-03-18 16:59:34 +01:00
Bernhard Schussek
1c85daa56b
[Form] Split FieldBuilder into FieldBuilder and FormBuilder to make creation of classes deterministic
2011-03-18 16:34:54 +01:00