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,13 +214,15 @@ class AccompanyingPeriodContext implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
$thirdParties = array_merge(
|
$thirdParties = array_merge(
|
||||||
array_filter([$entity->getRequestorThirdParty()]),
|
array_filter(array_values([$entity->getRequestorThirdParty()])),
|
||||||
array_filter(
|
array_filter(
|
||||||
array_map(
|
array_values(
|
||||||
fn (Resource $r): ?ThirdParty => $r->getThirdParty(),
|
array_map(
|
||||||
$entity->getResources()->filter(
|
fn (Resource $r): ?ThirdParty => $r->getThirdParty(),
|
||||||
static fn (Resource $r): bool => null !== $r->getThirdParty()
|
$entity->getResources()->filter(
|
||||||
)->toArray()
|
static fn (Resource $r): bool => null !== $r->getThirdParty()
|
||||||
|
)->toArray()
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -117,14 +117,16 @@ class AccompanyingPeriodWorkEvaluationContext implements
|
|||||||
$this->accompanyingPeriodWorkContext->buildPublicForm($builder, $template, $entity->getAccompanyingPeriodWork());
|
$this->accompanyingPeriodWorkContext->buildPublicForm($builder, $template, $entity->getAccompanyingPeriodWork());
|
||||||
|
|
||||||
$thirdParties = array_merge(
|
$thirdParties = array_merge(
|
||||||
array_filter($entity->getAccompanyingPeriodWork()->getThirdParties()->toArray()),
|
array_filter(array_values($entity->getAccompanyingPeriodWork()->getThirdParties()->toArray())),
|
||||||
array_filter([$entity->getAccompanyingPeriodWork()->getHandlingThierParty()]),
|
array_filter(array_values([$entity->getAccompanyingPeriodWork()->getHandlingThierParty()])),
|
||||||
array_filter(
|
array_filter(
|
||||||
array_map(
|
array_values(
|
||||||
fn (Resource $r): ?ThirdParty => $r->getThirdParty(),
|
array_map(
|
||||||
$entity->getAccompanyingPeriodWork()->getAccompanyingPeriod()->getResources()->filter(
|
fn (Resource $r): ?ThirdParty => $r->getThirdParty(),
|
||||||
static fn (Resource $r): bool => null !== $r->getThirdParty()
|
$entity->getAccompanyingPeriodWork()->getAccompanyingPeriod()->getResources()->filter(
|
||||||
)->toArray()
|
static fn (Resource $r): bool => null !== $r->getThirdParty()
|
||||||
|
)->toArray()
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -178,19 +178,23 @@ final class PersonContext implements PersonContextInterface
|
|||||||
|
|
||||||
$thirdParties = array_merge(
|
$thirdParties = array_merge(
|
||||||
array_filter(
|
array_filter(
|
||||||
array_map(
|
array_values(
|
||||||
fn (ResidentialAddress $r): ?ThirdParty => $r->getHostThirdParty(),
|
array_map(
|
||||||
$this
|
fn (ResidentialAddress $r): ?ThirdParty => $r->getHostThirdParty(),
|
||||||
->residentialAddressRepository
|
$this
|
||||||
->findCurrentResidentialAddressByPerson($entity)
|
->residentialAddressRepository
|
||||||
|
->findCurrentResidentialAddressByPerson($entity)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
array_filter(
|
array_filter(
|
||||||
array_map(
|
array_values(
|
||||||
fn (PersonResource $r): ?ThirdParty => $r->getThirdParty(),
|
array_map(
|
||||||
$entity->getResources()->filter(
|
fn (PersonResource $r): ?ThirdParty => $r->getThirdParty(),
|
||||||
static fn (PersonResource $r): bool => null !== $r->getThirdParty()
|
$entity->getResources()->filter(
|
||||||
)->toArray()
|
static fn (PersonResource $r): bool => null !== $r->getThirdParty()
|
||||||
|
)->toArray()
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user