[RSS Feed/News] Finder::setDefaultOrder vs Finder::order() differences in multi-column ordering

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
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:

$finder->setOrder([...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom