[COMPONENT][Collection] Add mechanism for specifying the ordering of note and actor queries

This commit is contained in:
2022-02-27 21:12:51 +00:00
parent 45c7888676
commit 35f3781a32
2 changed files with 16 additions and 5 deletions

View File

@@ -11,10 +11,10 @@ use Component\Collection\Collection as CollectionModule;
class Collection extends Controller
{
public function query(string $query, ?string $locale = null, ?Actor $actor = null): array
public function query(string $query, ?string $locale = null, ?Actor $actor = null, array $note_order_by = [], array $actor_order_by = []): array
{
$actor ??= Common::actor();
$locale ??= Common::currentLanguage()->getLocale();
return CollectionModule::query($query, $this->int('page') ?? 1, $locale, $actor);
return CollectionModule::query($query, $this->int('page') ?? 1, $locale, $actor, $note_order_by, $actor_order_by);
}
}