X

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

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

Xon

Guest

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 threads Most view View more
Back
Top Bottom