populate object_select_tag with your own objects in symfony


/ Published in: PHP
Save to your folder(s)

Sometimes you need to have an ability to show limited number of elements in your select objects or sort elements by name or so. I figured out that this feature was added to object_select_tag later so that not everybody knows about that. This feature’s name is ‘peer_method’ - effectively you create your peer method which returns objects which must appear in your object_select_tag. So here is the code for object_select_tag:

URL: http://www.symfonylab.com/how-to-populate-object_select_tag-with-your-own-objects/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.