John Wards
1a014d130e
[Form] Tests for Renderer Plugins
2011-03-22 22:19:51 +00:00
John Wards
37f12f68da
[Form] The declaration and initialization (constructor) of the variables should be in the same class.
2011-03-22 20:54:15 +00:00
John Wards
e54973b5d4
[Form] Refactoring Types to use new DataTransfomer interface
2011-03-22 15:40:52 +00:00
Bernhard Schussek
ea0e5bb2d6
[Form] Renamed FieldTypeInterface to FormTypeInterface
2011-03-22 12:36:41 +01:00
Bernhard Schussek
270a98e413
[Form] Added support for types that are not registered in the DIC. These are identified by their FQ class name.
2011-03-22 12:33:15 +01:00
John Wards
5a5fdd0529
Merge remote branch 'bernhard/experimental' into configuration
2011-03-22 07:43:47 +00:00
Bernhard Schussek
33692eae4a
[Form] Renamed Form::isTransformationSuccessful() to isSynchronized(). This method now indicates whether the data in the different representations is synchronized. Moved 'invalid' error to DefaultValidator
2011-03-22 02:03:22 +01:00
Bernhard Schussek
09da126464
[Form] Fixed validation.xml
2011-03-22 01:45:40 +01:00
Bernhard Schussek
16d65f6f16
[Form] Moved previously skipped tests from FormTypeTest to FormTest and fixed them
2011-03-22 01:40:02 +01:00
Bernhard Schussek
577e106361
[Form] Implemented custom mapping of data errors to form fields
2011-03-22 01:15:48 +01:00
John Wards
b4406f254d
[Form] Removing Configurable from DataTransformers
2011-03-21 23:01:10 +00:00
John Wards
7d7c36a178
[Form] More sensible constructor variable order
2011-03-21 21:42:34 +00:00
Bernhard Schussek
87665bc380
[Form] Decoupled FormBuilder from CSRF protection
2011-03-21 22:41:19 +01:00
John Wards
714f2173be
[Form] Coding conventions and use of the new variables
2011-03-21 21:39:59 +00:00
John Wards
3c80bc37df
[Form] Removing use of old class
2011-03-21 21:20:57 +00:00
John Wards
d8287a6dff
Merge remote branch 'bernhard/experimental' into experimental
2011-03-21 21:18:04 +00:00
John Wards
002a22df04
[Form] Refactoring DateTimeToStringTranformer not to use Configuration
2011-03-21 21:16:20 +00:00
Bernhard Schussek
c1abf08d9c
[Form] Implemented error bubbling
2011-03-21 22:13:02 +01:00
Bernhard Schussek
255eda5238
[Form] Renamed RecursiveFieldIterator to RecursiveFormIterator
2011-03-21 21:19:36 +01:00
Bernhard Schussek
3985522b9b
[Form] Removed obsolete classes Error and DataError
2011-03-21 21:19:31 +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
acaa9c9058
[Form] Fixed signature of Form::addError()
2011-03-20 15:23:36 +01:00
Bernhard Schussek
6c9ff0a2a3
[Form] Improved naming of data conversion methods in Form and made them private
2011-03-20 15:22:37 +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
b5656f1290
[Form] Renamed ObjectMapper to PropertyPathMapper
2011-03-20 10:29:23 +01:00
Bernhard Schussek
295d01745b
[Form] Renamed StripTagsFilter to StripTagsListener until we have better conventions
2011-03-20 10:26:38 +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
Benjamin Eberlei
d62213662e
Merge branch 'experimental' of git://github.com/bschussek/symfony into forms
2011-03-19 20:36:56 +01:00
Benjamin Eberlei
864a3ec45f
[Form] Add StripTagsFilter EventListener
2011-03-19 20:36:49 +01:00
Bernhard Schussek
a1c3d21d0e
[Form] Added comment
2011-03-19 19:56:18 +01:00
Bernhard Schussek
e9cb19721a
[Form] Optimized code in Form to remove one event listener
2011-03-19 19:53:39 +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
3586268bc2
[Form] Renamed field types. They are now always the name of the type with a 'Type' suffix
2011-03-19 18:31:24 +01:00
Bernhard Schussek
65353bd81e
[Form] Fixed failing choice field tests
2011-03-19 18:22:08 +01:00
Benjamin Eberlei
c05b3c440d
[Form] Add DefaultFormFactory for convenience usage outside of a DIC context.
2011-03-19 18:14:15 +01:00
Benjamin Eberlei
39c2d3f166
[Form] Add PhpTheme that relies on no Template Engine, generalize tests to use for PhpTheme and PhpEngineTheme. Fixed some bugs
2011-03-19 17:47:18 +01:00
Bernhard Schussek
43a24fa931
[Form] Renamed events to match terminology in Field
2011-03-19 16:59:23 +01:00
Bernhard Schussek
0259d4da1e
[Form] Moved namespace DataValidator to Validator
2011-03-19 16:54:07 +01:00
Bernhard Schussek
7f9284105d
[Form] Moved namespace FieldGuesser to Type\Guesser
2011-03-19 16:46:03 +01:00
Benjamin Eberlei
af60ddf8ad
Moved PhpTheme to FrameworkBundle and renamed to PhpEngineTheme
2011-03-19 15:27:39 +01:00
Benjamin Eberlei
32e1a7c8f9
Merge bschussek/experimental into branch forms.
2011-03-19 15:18:52 +01:00
Bernhard Schussek
d2210a2e79
[Form] Removed unused Form::isCsrfTokenValid()
2011-03-19 15:09:11 +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
Benjamin Eberlei
bb8c2a9b9d
Rename this to renderer to be able to use it in Php Templating
2011-03-19 11:54:46 +01:00
Benjamin Eberlei
d44e2264ba
Merge branch 'experimental' of git://github.com/bschussek/symfony into forms
2011-03-19 09:36:30 +01:00
Bernhard Schussek
b66b8326a8
[Form] Fixed undefined variable in DefaultRenderer
2011-03-18 17:03:12 +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
Bernhard Schussek
2a1e394352
[Form] Renamed field configs to types. Everywhere else, we are referring to the name of the type as 'type' now (was 'identifier')
2011-03-18 16:20:00 +01:00
Bernhard Schussek
0b929ee342
[Form] Renamed ValueTransformers to DataTransformers to fit with DataMapper and DataValidator
2011-03-18 16:01:06 +01:00
Bernhard Schussek
f86ecec403
[Form] Extracted data validation logic into DataValidatorInterface
2011-03-18 15:58:22 +01:00
Bernhard Schussek
97d0183d84
[Form] Moved properties propertyPath, modifyByReference, validationGroups and virtual to generic attributes because they are specific to the used data validator/mapper implementations
2011-03-18 15:26:02 +01:00
Bernhard Schussek
700c96e7fa
[Form] Moved FieldFactoryTest to FormFactoryTest and fixed it
2011-03-18 14:37:54 +01:00
Bernhard Schussek
4cb76c0045
[Form] Moved error distribution logic to validation listener
2011-03-18 13:07:06 +01:00
Bernhard Schussek
9caaf0f3a3
[Form] Introduced FieldBuilder for field/form creation and made Field/Form mostly immutable
2011-03-18 12:50:26 +01:00
Benjamin Eberlei
76b0041d1b
[Form] Implemented first PhpTheme attempt
2011-03-17 22:47:19 +01:00
Bernhard Schussek
a51321c264
[Form] Moved validation logic to ValidationListener
2011-03-17 21:47:12 +01:00
Bernhard Schussek
0799662361
[Form] Extracted data mapping logic from Form into ObjectMapperListener
2011-03-17 21:23:59 +01:00
Benjamin Eberlei
3bc825bbd4
Merge branch 'experimental' of git://github.com/bschussek/symfony into forms
2011-03-17 19:05:59 +01:00
Benjamin Eberlei
85b61fe1e2
First attempt of PhpTheme.
2011-03-17 19:05:48 +01:00
Bernhard Schussek
d00f1fa205
[Form] Removed unused method Form::deepArrayUnion()
2011-03-17 15:22:48 +01:00
Bernhard Schussek
8e41cc66fe
[Form] Moved form logic to event listeners
2011-03-17 15:22:10 +01:00
Bernhard Schussek
7a63b840f3
[Form] Renamed submit() to bind()
2011-03-17 14:55:26 +01:00
Bernhard Schussek
5bfd02bcd0
[Form] Renamed bind() to bindRequest(). It is now semantically the same as in symfony1 again
2011-03-17 14:51:22 +01:00
Bernhard Schussek
f2f78890de
[Form] Removed deprecated method preprocessData()
2011-03-17 14:41:26 +01:00
Bernhard Schussek
ffa5bd264a
[Form] Moved logic of Field::isMultipart() to rendering layer
2011-03-17 14:40:34 +01:00
Bernhard Schussek
50ce0d53a0
[Form] Removed FieldInterface::getDisplayedData(). Use getTransformedData() instead
2011-03-17 14:28:59 +01:00
Bernhard Schussek
f0d841ef8c
[Form] Fixed DateTimeToArrayTransformer when transforming empty values and the option 'fields' is set
2011-03-17 14:27:10 +01:00
Bernhard Schussek
eba602ed1b
[Form] Removed dependency from renderer plugins on fields. The field instance is now passed to setUp() instead.
2011-03-17 13:37:27 +01:00
Bernhard Schussek
cb283d3783
[Form] Renamed 'key' to 'name'. Removed setKey() totally.
2011-03-17 11:03:10 +01:00
Bernhard Schussek
caa49aa841
[Form] Moved trimming logic to listener
2011-03-17 10:52:23 +01:00
Bernhard Schussek
e85aab2dc1
[Form] Changed form to use the new EventDispatcher implementation
2011-03-16 18:20:13 +01:00
Bernhard Schussek
fb8efaba67
[Form] Fixed a couple of failing tests
2011-03-16 16:13:06 +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
Jordi Boggiano
991b1ed225
[HttpFoundation] UploadedFile::getOriginalName is now overriding getName
2011-03-09 17:26:08 +01:00
Jordi Boggiano
88cfc4c011
[Form] Add exception for missing enctype attribute
2011-03-09 17:23:21 +01:00
Fabien Potencier
9f0f127e6a
[Form] fixed typo in XSD path
2011-03-09 02:34:51 +01:00
Fabien Potencier
8c423edfef
replaced symfony-project.org by symfony.com
2011-03-06 12:40:06 +01:00
Bernhard Schussek
4346097ffd
[Form] Added TODOs and a tweak
2011-03-04 16:01:50 +01:00
Bernhard Schussek
bfbc1121ce
[Form] Added ArrayAccess to DefaultRenderer
2011-03-02 22:56:20 +01:00
Bernhard Schussek
0f8cd43ac4
[Form] The TwigTheme now accepts several templates
2011-03-02 16:24:22 +01:00
Bernhard Schussek
e53c688a6b
[Form] Fixed RepeatedField, improved structure of the Twig templates
2011-03-02 16:00:31 +01:00
Bernhard Schussek
ea49621034
[Form] Fixed CSRF protection
2011-03-02 15:01:04 +01:00
Bernhard Schussek
5705f74bd0
[Form] Refactored FieldFactory and moved new implementation into the DIC. FormTest fails now.
2011-03-02 14:58:19 +01:00
Bernhard Schussek
68013f4db2
Merge remote branch 'symfony/master' into experimental
2011-03-02 12:27:30 +01:00
Bernhard Schussek
8a6246bd06
[Form] Refactored contents of FormFactory into individual FieldConfig classes
2011-03-02 12:20:30 +01:00
Pascal Borreli
f3a0b3fd83
[Form] Fixed Typo
2011-03-01 18:58:08 +01:00
Bernhard Schussek
9eff64dd54
[Form] Added EventListener implementation and moved CollectionField to factory
2011-03-01 15:18:55 +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
c1edf116f2
[Form] Removed notion of "hidden" fields
...
Instead, hidden fields now override the "row" template to not include a label or errors.
The "rest" (former "hidden") helper has been adapted to output any fields that were not
rendered manually. It should usually be called at the end of a form.
2011-02-28 17:01:11 +01:00
Bernhard Schussek
02d2121dcd
[Form] Improved rendering
...
Fields are not available in the templates anymore. Instead, all required information can be
accessed through view variables.
Example usage of helpers and variables in a form theme:
// use the label helper
{{ this.label('my label') }}
// use the label variable
{{ this.vars.label }}
{{ label }}
Example usage of helpers and variables in a normal template:
// use the label helper
{{ field.label('my label') }}
// use the label variable
{{ field.vars.label }}
2011-02-28 16:50:23 +01:00
Fabien Potencier
37178fed01
Merge remote branch 'lewinski/radio-infinite-recursion-fix'
...
* lewinski/radio-infinite-recursion-fix:
[Form] Fix infinite recursion in RadioField->getName()
2011-02-27 22:35:57 +01:00