FormType for Tree
Well, I think that I have an issue here. If the entity uses Tree, I cannot use a form with choices, because there are no form types able to render a tree choice. How can I build a form element which uses a Tree entity? is there anything like that?
This tree choice field type implemented in my fork of this repo, but there are no pull request from me because it is not very good implementation yet. You can see my repo here: https://github.com/artseld/StofDoctrineExtensionsBundle . If you will use my bundle you need to additionally include jQuery library (manually or from another bundle which use it, e.g. SonataJQuery, etc.)
@artseld The implementation seems indeed not so good. But I think the worse thing I saw in the diff is <?php used in a Twig template in many places :)
@stof I'm sorry, it was a bad and unused template, it should not be commited =) Thank you, fixed already. If tree form view will be configurable in FormType (e.g., collapsed or expanded, expanded only if sub-items selected and etc.), it will be good?
Thank both, I will test your implementation @artseld.