Created
December 19, 2011 16:55
-
-
Save docteurklein/1497965 to your computer and use it in GitHub Desktop.
avoid errors when binding empty propel collection to a symfony2 form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$callback = function($data = null) { | |
if (empty($data)) { | |
return new \PropelObjectCollection(); | |
} | |
return $data; | |
}; | |
$builder | |
->appendClientTransformer(new CallbackTransformer($callback, $callback)); | |
; |
Actually, I never got this issue..
Envoyé de mon iPhone
Le 20 déc. 2011 à 08:47, Klein [email protected] a écrit :
… no problem **anymore**. I think it could be useful to either provide this dataTransformer in a PropelCollection type or describe the problem here: http://www.propelorm.org/cookbook/symfony2/mastering-symfony2-forms-with-propel.html
---
Reply to this email directly or view it on GitHub:
https://gist.github.com/1497965
interesting, I've maybe done something wrong. I'l try to dig into that.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
no problem anymore. I think it could be useful to either provide this dataTransformer in a PropelCollection type or describe the problem here: http://www.propelorm.org/cookbook/symfony2/mastering-symfony2-forms-with-propel.html