mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
Merge branch 'master' into upgrade-sf5
This commit is contained in:
@@ -290,7 +290,13 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ReadableCollection<int, User>
|
||||
* Retrieves a collection of current referrers.
|
||||
*
|
||||
* This method filters the referrer history to get only those entries
|
||||
* where the end date is null, maps them to their associated users,
|
||||
* and returns them as a new ReadableCollection.
|
||||
*
|
||||
* @return ReadableCollection<int, User> collection of active referrers
|
||||
*/
|
||||
#[Serializer\Groups(['accompanying_period_work:edit'])]
|
||||
public function getReferrers(): ReadableCollection
|
||||
@@ -303,6 +309,18 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
|
||||
return new ArrayCollection(array_values($users));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ReadableCollection<int, AccompanyingPeriodWorkReferrerHistory>
|
||||
*/
|
||||
public function getReferrersHistoryCurrent(): ReadableCollection
|
||||
{
|
||||
return new ArrayCollection(
|
||||
$this->getReferrersHistory()
|
||||
->filter(fn (AccompanyingPeriodWorkReferrerHistory $h) => null === $h->getEndDate())
|
||||
->getValues()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, AccompanyingPeriodWorkReferrerHistory>
|
||||
*/
|
||||
|
Reference in New Issue
Block a user