$qb->orderBy('e.id', $order);
} elseif ('updated' === $sort) {
$qb->orderBy('e.updatedAt', $order);
+ } elseif ('archived' === $sort) {
+ $qb->orderBy('e.archivedAt', $order);
}
$pagerAdapter = new DoctrineORMAdapter($qb, true, false);
*/
private function getSortedQueryBuilderByUser($userId, $sortBy = 'createdAt', $direction = 'desc')
{
- return $this->sortQueryBuilder($this->getQueryBuilderByUser($userId));
+ return $this->sortQueryBuilder($this->getQueryBuilderByUser($userId), $sortBy, $direction);
}
/**