$itemFinder->order(['rating_avg' => 'desc', 'rating_count' => 'desc'])
xf_r9_item_item
.comment_count
DESC, xf_r9_item_item
.create_date
DESCxf_r9_item_item
.comment_count
ASC, xf_r9_item_item
.create_date
DESC$itemFinder->order(['comment_count' => 'asc', 'create_date' => 'desc'])
$itemFinder->order(['comment_count' => 'asc', 'create_date' => 'desc']);
$itemFinder->order(['comment_count', 'create_date'],'desc');
$finder = \XF::finder('XF:User');
$users = $finder->order('message_count', 'DESC')->order('register_date')->limit(10);
$itemFinder->order([['comment_count', 'asc'],['create_date', 'desc']])
$itemFinder->order([
['comment_count', $direction],
['create_date', 'desc'],
]);
order
call on a new line too to help readability. Personally I like to only call each function once where possible.We use essential cookies to make this site work, and optional cookies to enhance your experience.