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