What is the best way to reverse a custom collection created with new Varien_Data_Collection()?
What is the best way to reverse a custom collection created with new Varien_Data_Collection()
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Is the collection already loaded? The class supports setOrder, so if you know how it’s ordered and it isn’t yet loaded yet, you can simply call setOrder on the same field, using
Varien_Data_Collection::SORT_ORDER_DESCorVarien_Data_Collection::SORT_ORDER_ASCas appropriate. Alternatively if you only require the objects and nothing specific to the collection you could use.