Is it possible to use a custom orderBy on the Taxonomy Vocabulary Index resource?
From _taxonomy_vocabulary_resource_index(), it looks like the orderBy values are hard coded in, and there isn't a way to dynamically change them.
Is it possible to use a custom orderBy on the Taxonomy Vocabulary Index resource?
From _taxonomy_vocabulary_resource_index(), it looks like the orderBy values are hard coded in, and there isn't a way to dynamically change them.
Comments
Comment #1
ygerasimov commentedYes. Order by is hardcoded in _taxonomy_vocabulary_resource_index(). If you would like to change that please alter resources (http://drupalcode.org/project/services.git/blob/refs/heads/7.x-3.x:/docs...) and have custom index callback for taxonomy resource.
Also if you would like to dynamically be able to change query parameters for index call -- take a look at services_views module.
Comment #2
tyler.frankenstein commentedThanks for the clarification. If it sounds reasonable to the Services team, I'd like to patch _taxonomy_vocabulary_resource_index() (and all other entity index resources) to by default use the Order By that is hard coded in, but then allow an optional parameter that can be passed in to specify the desired order by.
Does this sound reasonable Services team? If so, please let me know and I'll get started on the patch(es). Thanks!
Comment #3
ygerasimov commentedNo need to patch services resources. They are build to provide demo but they won't suite all possible combinations of requirements so lets not bother with this. Main thing that services module provides way to extend everything to suit every particular case.