Commit Graph

758 Commits

Author SHA1 Message Date
Fabien Potencier
d3b78075f0 [Doctrine] fixed Doctrine guesser when the object is a proxy and not an original entity instance
After this patch, the guesser is run for regular entity instances and proxy instances.
2011-07-06 08:53:29 +02:00
Johannes Schmitt
1cc102788b added @Annotation to UniqueEntity 2011-06-30 12:36:37 +02:00
Fabien Potencier
f57e1d3e10 fixed CS 2011-06-23 14:07:53 +02:00
Christian Raue
c17a836985 typo 2011-06-20 23:14:48 -07:00
Fabien Potencier
fb24b95bd5 made some tweaks to error levels 2011-06-15 13:04:19 +02:00
Fabien Potencier
a232c148eb fixed CS 2011-06-14 12:54:32 +02:00
Fabien Potencier
0ec604cb1e Merge remote branch 'mschneid/master'
* mschneid/master:
  Fix array access
2011-06-13 11:12:46 +02:00
Michael Schneider
fdab1955f8 Fix array access
If you provide only one field as string you're not able to access the $constraint->fields as an array. Use $fields instead.
2011-06-12 23:48:17 +02:00
Christian Raue
99eb3a120d typo 2011-06-12 11:59:47 -07:00
Fabien Potencier
293ba3426a [DoctrineBridge] fixed guesser 2011-06-10 19:41:49 +02:00
Fabien Potencier
e685b5fc21 Merge remote branch 'yethee/doctrine_bridge'
* yethee/doctrine_bridge:
  [DoctrineBridge] Removed all options of the parent type
  [DoctrineBridge] Removed unneeded use statement
  [DoctrineBridge] Fixed typo
  [DoctrineBridge] Removed duplicating options in EntityType
2011-06-08 19:51:57 +02:00
Fabien Potencier
e0b768bfc0 [DoctrineBridge] fixed typo 2011-06-08 19:34:26 +02:00
Deni
70477c4995 [DoctrineBridge] Removed all options of the parent type 2011-06-08 20:39:16 +04:00
Deni
40d358e7cb [DoctrineBridge] Removed unneeded use statement 2011-06-08 19:01:33 +04:00
Deni
1a75b7c8ca [DoctrineBridge] Fixed typo 2011-06-08 18:52:54 +04:00
Deni
3bbec2e6a7 [DoctrineBridge] Removed duplicating options in EntityType 2011-06-08 18:46:38 +04:00
Fabien Potencier
1aabc5da64 fixed CS 2011-06-08 12:16:48 +02:00
Fabien Potencier
62e4342a86 fixed CS 2011-06-08 12:12:55 +02:00
Fabien Potencier
2d91183d86 [DoctrineBridge] fixed field guesser 2011-06-08 09:45:44 +02:00
Fabien Potencier
879242cdf5 moved some Doctrine classes from the bundle to the bridge 2011-06-08 08:41:44 +02:00
Fabien Potencier
fbf36957e6 refactored Doctrine Bridge
* added a RegistryInterface

 * changed all classes to depend on the Registry instead of a specific EntityManager

This is more consistent as the validator already took the registry and this allows
to use any entity manager in Forms.
2011-06-08 08:35:48 +02:00
Pascal Borreli
404c452c0b [Various] Phpdoc & typos 2011-06-04 15:30:56 +00:00
Fabien Potencier
79e709cdc9 removed the ON_ prefix for Form event names 2011-05-31 07:19:18 +02:00
Fabien Potencier
4753bb2e91 - 2011-05-30 13:53:46 +02:00
Fabien Potencier
9b7e14dd10 [Form] converted code to the new event dispatcher 2011-05-30 09:37:42 +02:00
Pascal Borreli
46cdf02750 [Various] Fixed typo 2011-05-29 14:19:02 +00:00
Fabien Potencier
610583899d Merge remote branch 'CodeMeme/889-EntityChoiceField-grouped-choices'
* CodeMeme/889-EntityChoiceField-grouped-choices:
  Whitespace cleanup
  Fixed EntityChoiceList to support grouped entities Refs #889
  Added test for grouped entity choice list Refs #889
2011-05-27 07:44:35 +02:00
Eric Clemmons
fb9d951b1d Fixed EntityChoiceList to support grouped entities
Refs #889
2011-05-26 18:59:21 -07:00
jdhoek
cc5a100418 Add missing {} around @inheritDoc to fix this class in SF beta2. 2011-05-24 00:41:35 -07:00
Fabien Potencier
9fe1c3ae0e Merge remote branch 'bschussek/form'
* bschussek/form: (22 commits)
  Fix merge error (function "guess" was in there twice)
  [Form] Added test case for bf2f9d2a02
  [Form] Form::isBound() and Form::isValid() work correctly now for read-only forms
  [Locale] Improved error reporting and added stubs for intl_is_failure(), intl_get_error_code() and intl_get_error_message()
  [Form] Implemented fix for 361c67f54f
  [Form] Add test for the handling of array values in the constraint violation
  [Form] Further simplified PropertyPath code
  [Form] Added test for 6c337d1cc0
  [Form] Removed unused option "pattern" of date and time type
  [Form] Renamed view variable "name" to "full_name"
  [Form] Renamed collection option "type_options" to "options" to be consistent with the repeated type
  [Form] CSRF documentation and a few CS changes
  [Form] Move CSRF options from types to the CSRF extension
  [Form] Added a search form field type
  [Form] Optimization of PropertyPath
  [Form] replace assertEquals by assertFalse, assertTrue, assertNull
  [Form] fix file permissions to 644 again ;)
  [Form] add tests for type_options in collectionType
  fix file permissions to 644
  [Form] add type_options for CollectionType to be abble to set options to type
  ...
2011-05-19 16:25:30 +02:00
Benjamin Eberlei
a4f1b8a0c1 [Doctrine] Fix default value to null for entity manager to make fluent integration with Doctrine Registry work 2011-05-18 23:26:20 +02:00
Benjamin Eberlei
23cf63d767 [Doctrine] Add fields as default option and allow strings to be passed. 2011-05-18 23:25:16 +02:00
Benjamin Eberlei
8ff1d09d36 [Doctrine] Implement suggested changes by Stof, added functional test to verify unique validator works. 2011-05-18 22:57:25 +02:00
Bernhard Schussek
216d7e415d Merge remote branch 'mweimerskirch/form_pattern_attribute' into mweimerskirch_merge
Conflicts:
	src/Symfony/Bundle/TwigBundle/Resources/views/Form/div_layout.html.twig
	src/Symfony/Component/Form/Extension/Core/Type/FieldType.php
	src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php
2011-05-18 22:49:27 +02:00
Benjamin Eberlei
cfc2471109 [Doctrine] Add Unique Validator 2011-05-17 23:04:13 +02:00
Victor Berchet
42698608cb [Form] CS related changes 2011-05-15 21:39:22 +02:00
Bernhard Schussek
486a01bfe2 [Form] Removed unused option 2011-05-13 18:56:09 +02:00
Michel Weimerskirch
476644a92c [Form] Support for the HTML5 "pattern" attribute, see http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#the-pattern-attribute
If you use the MinLength validator with your entities, the ValidatorTypeGuesser gets the value, stored as "minlength". Then, the FormFactory generates a "pattern" attribute out of minlength and maxlength.
Modern browsers such as Chrome use this attribute to validate the form before submitting.
a "pattern" attribute is generated that validates the
2011-05-04 23:16:41 +02:00
Daniel Holmes
dd692c0203 [Form] fixed transformation failed exception 2011-05-04 05:51:03 -07:00
Pascal Borreli
391744719a Various typos 2011-04-30 19:40:15 +00:00
Fabien Potencier
4fb1035578 fixed Doctrine EntityType when the identifier is a string 2011-04-28 08:39:14 +02:00
Eriksen Costa
164ce5210d capitalized 'boolean' 2011-04-27 02:35:10 -03:00
Fabien Potencier
08bf2af455 fixed email 2011-04-24 13:59:46 +02:00
Pascal Borreli
8c0beea677 [Phpdoc] Cleaning/fixing 2011-04-23 15:18:47 +00:00
Fabien Potencier
9a4da005a2 Merge remote branch 'bschussek/form-extensions'
* bschussek/form-extensions:
  [Form] Refactored code from CoreExtension to new ValidatorExtension
  [Form] Added FormTypeExtensionInterface
  [Form] Reorganized code into "form extensions"
2011-04-23 09:11:25 +02:00
Pascal Borreli
b5769c52d6 Fixed various typo 2011-04-22 23:12:50 +00:00
Bernhard Schussek
54e66c518f [Form] Reorganized code into "form extensions"
The extension classes are now the only constructor argument of the FormFactory class. They replace the existing "type loader" classes.

    new FormFactory(array(
        new CoreExtension($validator, $storage),
        new CsrfExtension($csrfProvider),
        new DoctrineOrmExtension($em),
    ));

Together with a few upcoming commits this mechanism will make

 * extension of the form framework in bundles and
 * usage of the forms outside of Symfony2

much easier.
2011-04-22 17:41:21 +02:00
Fabien Potencier
4bb823fda4 [Form] added missing interfaces 2011-04-18 10:54:34 +02:00
Fabien Potencier
3a2ca3dd92 moved Doctrine2 Entity Type guesser to the Doctrine bridge 2011-04-18 08:44:37 +02:00
Bernhard Schussek
fa457b1cc4 [Form] Renamed 'filter' listeners to 'on' to match naming conventions across the framework 2011-04-15 10:57:32 +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
be9ef42af9 [Form] Renamed choice transformers for better clarity 2011-04-02 16:11:20 +02:00
Bernhard Schussek
a4bbc40ac6 [Form] Cleaned up ChoiceListInterface 2011-04-02 15:41:43 +02:00
Bernhard Schussek
d3c8647f49 [Form] Fixed EntitiesToArrayTransformer::reverseTransform() to accept NULL values 2011-04-02 14:13:16 +02:00
Bernhard Schussek
edfae73cd4 [Form] Moved PropertyPath, PropertyPathIterator and VirtualFormAwareIterator to subnamespace Util 2011-03-27 15:37:13 +02:00
Bernhard Schussek
89361d036f [Form] Renamed FormType::configure() to FormType::buildForm() 2011-03-26 18:52:24 +01:00
Bernhard Schussek
40ee22c8b4 [Form] Fixed call to DataEvent::getForm() in Doctrine bridge 2011-03-25 02:17:40 +01:00
Benjamin Eberlei
ee96ad0e81 [Form] [DoctrineBridge] Move EntityType and DoctrineTypeLoader into Doctrine Bridge 2011-03-24 22:43:00 +01:00