diff --git a/src/Bundle/ChillMainBundle/Controller/LocationController.php b/src/Bundle/ChillMainBundle/Controller/LocationController.php index 10087ec1e..97deac9c5 100644 --- a/src/Bundle/ChillMainBundle/Controller/LocationController.php +++ b/src/Bundle/ChillMainBundle/Controller/LocationController.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\MainBundle\Controller; use Chill\MainBundle\CRUD\Controller\CRUDController; +use Chill\MainBundle\Pagination\PaginatorInterface; use Symfony\Component\HttpFoundation\Request; class LocationController extends CRUDController @@ -29,4 +30,9 @@ class LocationController extends CRUDController { $query->where('e.availableForUsers = true'); //TODO not working } + + protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator) + { + return $query->addOrderBy('e.name', 'DESC'); + } } diff --git a/src/Bundle/ChillMainBundle/Resources/views/Location/index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Location/index.html.twig index a04ae73a9..aa883c603 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Location/index.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Location/index.html.twig @@ -47,6 +47,8 @@ + {{ chill_pagination(paginator) }} +