mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 15:43:51 +00:00
add order by on document list
This commit is contained in:
@@ -155,7 +155,7 @@ class DocumentAccompanyingCourseController extends AbstractController
|
||||
$documents = $this->courseRepository
|
||||
->findBy(
|
||||
['course' => $course],
|
||||
['date' => 'DESC'],
|
||||
['date' => 'DESC', 'id' => 'DESC'],
|
||||
$pagination->getItemsPerPage(),
|
||||
$pagination->getCurrentPageFirstItemNumber()
|
||||
);
|
||||
|
@@ -178,7 +178,7 @@ class DocumentPersonController extends AbstractController
|
||||
|
||||
$documents = $this->personDocumentACLAwareRepository->findByPerson(
|
||||
$person,
|
||||
[],
|
||||
['date' => 'DESC', 'id' => 'DESC'],
|
||||
$pagination->getItemsPerPage(),
|
||||
$pagination->getCurrentPageFirstItemNumber()
|
||||
);
|
||||
|
@@ -64,7 +64,7 @@ class PersonDocumentACLAwareRepository implements PersonDocumentACLAwareReposito
|
||||
|
||||
$this->addACL($qb, $person);
|
||||
|
||||
foreach ($orderBy as [$field, $order]) {
|
||||
foreach ($orderBy as $field => $order) {
|
||||
$qb->addOrderBy($field, $order);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user