mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
Feature: add thirdParty choice in docgen context - use array_values
This commit is contained in:
parent
9593cfde36
commit
1b0569c974
@ -214,8 +214,9 @@ class AccompanyingPeriodContext implements
|
||||
}
|
||||
|
||||
$thirdParties = array_merge(
|
||||
array_filter([$entity->getRequestorThirdParty()]),
|
||||
array_filter(array_values([$entity->getRequestorThirdParty()])),
|
||||
array_filter(
|
||||
array_values(
|
||||
array_map(
|
||||
fn (Resource $r): ?ThirdParty => $r->getThirdParty(),
|
||||
$entity->getResources()->filter(
|
||||
@ -223,6 +224,7 @@ class AccompanyingPeriodContext implements
|
||||
)->toArray()
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
if ($options['thirdParty'] ?? false) {
|
||||
|
@ -117,9 +117,10 @@ class AccompanyingPeriodWorkEvaluationContext implements
|
||||
$this->accompanyingPeriodWorkContext->buildPublicForm($builder, $template, $entity->getAccompanyingPeriodWork());
|
||||
|
||||
$thirdParties = array_merge(
|
||||
array_filter($entity->getAccompanyingPeriodWork()->getThirdParties()->toArray()),
|
||||
array_filter([$entity->getAccompanyingPeriodWork()->getHandlingThierParty()]),
|
||||
array_filter(array_values($entity->getAccompanyingPeriodWork()->getThirdParties()->toArray())),
|
||||
array_filter(array_values([$entity->getAccompanyingPeriodWork()->getHandlingThierParty()])),
|
||||
array_filter(
|
||||
array_values(
|
||||
array_map(
|
||||
fn (Resource $r): ?ThirdParty => $r->getThirdParty(),
|
||||
$entity->getAccompanyingPeriodWork()->getAccompanyingPeriod()->getResources()->filter(
|
||||
@ -127,6 +128,7 @@ class AccompanyingPeriodWorkEvaluationContext implements
|
||||
)->toArray()
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$options = $template->getOptions();
|
||||
|
@ -178,14 +178,17 @@ final class PersonContext implements PersonContextInterface
|
||||
|
||||
$thirdParties = array_merge(
|
||||
array_filter(
|
||||
array_values(
|
||||
array_map(
|
||||
fn (ResidentialAddress $r): ?ThirdParty => $r->getHostThirdParty(),
|
||||
$this
|
||||
->residentialAddressRepository
|
||||
->findCurrentResidentialAddressByPerson($entity)
|
||||
)
|
||||
)
|
||||
),
|
||||
array_filter(
|
||||
array_values(
|
||||
array_map(
|
||||
fn (PersonResource $r): ?ThirdParty => $r->getThirdParty(),
|
||||
$entity->getResources()->filter(
|
||||
@ -193,6 +196,7 @@ final class PersonContext implements PersonContextInterface
|
||||
)->toArray()
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
if ($options['thirdParty'] ?? false) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user