Hmm. Although I didn't test it, it looks like that one liner that got flagged by the admin does basically the same thing (although I notice the author forgot to factor in your alphabetical sort request). wmk's answer explains it better though. I submitted an edit to that second answer, but it needs peer review. So you can do it with a single return line too guess. Code probably a bit less maintainable though.
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.