The listener is used by the Collection type as well as the Choice and Entity type (with multiple selection). The effect is that you can have for example this model: class Article { public function addTag($tag) { ... } public function removeTag($tag) { ... } public function getTags($tag) { ... } } You can create a form for the article with a field "tags" of either type "collection" or "choice" (or "entity"). The field will correctly use the three methods of the model for displaying and editing tags. |
||
---|---|---|
.. | ||
Symfony/Tests | ||
bootstrap.php |