📢 Moderators Needed 🚀

Moderators are needed with resources to post or have access to resources to post. Submit an application to be considered.
X

RSS Finder::setDefaultOrder vs Finder::order() differences in multi-column ordering

  • Thread starter Thread starter Xon
  • Start date Start date
X

Xon

Guest
Guest or Bot
Suppose a new multi-column sort order is added by extending in \XF\Repository with;
PHP:

Code:
public function getDefaultThreadListSortOptions($forAdminConfig): array
{
    $options = parent::getDefaultThreadListSortOptions($forAdminConfig);

    $options['MyNewColumnAlias'] = [
        ['MyNewColumn'],
        ['last_post_date'],
    ];

    return $options;
}

When set as an explicit forum filter, this results in the following code;
PHP:

Code:
$finder->setOrder([
 ['MyNewColumn']...

Read more

Continue reading...
 
Similar content Most view View more
Back
Top