From dc5ff53a578f9d27394e2ef0b6d38d92f3dd7225 Mon Sep 17 00:00:00 2001 From: nobohan Date: Tue, 8 Mar 2022 11:21:59 +0100 Subject: [PATCH] order accompanying course by openingDate for Household --- .../ChillPersonBundle/Controller/HouseholdController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Bundle/ChillPersonBundle/Controller/HouseholdController.php b/src/Bundle/ChillPersonBundle/Controller/HouseholdController.php index 07fa34b5a..0a8b7eea1 100644 --- a/src/Bundle/ChillPersonBundle/Controller/HouseholdController.php +++ b/src/Bundle/ChillPersonBundle/Controller/HouseholdController.php @@ -78,6 +78,10 @@ class HouseholdController extends AbstractController } } + usort($accompanyingPeriods, static function ($a, $b) { + return $b->getOpeningDate() > $a->getOpeningDate(); + }); + $oldMembers = $household->getNonCurrentMembers(); $accompanyingPeriodsOld = [];