mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +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(
|
$thirdParties = array_merge(
|
||||||
array_filter([$entity->getRequestorThirdParty()]),
|
array_filter(array_values([$entity->getRequestorThirdParty()])),
|
||||||
array_filter(
|
array_filter(
|
||||||
|
array_values(
|
||||||
array_map(
|
array_map(
|
||||||
fn (Resource $r): ?ThirdParty => $r->getThirdParty(),
|
fn (Resource $r): ?ThirdParty => $r->getThirdParty(),
|
||||||
$entity->getResources()->filter(
|
$entity->getResources()->filter(
|
||||||
@ -223,6 +224,7 @@ class AccompanyingPeriodContext implements
|
|||||||
)->toArray()
|
)->toArray()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($options['thirdParty'] ?? false) {
|
if ($options['thirdParty'] ?? false) {
|
||||||
|
@ -117,9 +117,10 @@ 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_values(
|
||||||
array_map(
|
array_map(
|
||||||
fn (Resource $r): ?ThirdParty => $r->getThirdParty(),
|
fn (Resource $r): ?ThirdParty => $r->getThirdParty(),
|
||||||
$entity->getAccompanyingPeriodWork()->getAccompanyingPeriod()->getResources()->filter(
|
$entity->getAccompanyingPeriodWork()->getAccompanyingPeriod()->getResources()->filter(
|
||||||
@ -127,6 +128,7 @@ class AccompanyingPeriodWorkEvaluationContext implements
|
|||||||
)->toArray()
|
)->toArray()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$options = $template->getOptions();
|
$options = $template->getOptions();
|
||||||
|
@ -178,14 +178,17 @@ final class PersonContext implements PersonContextInterface
|
|||||||
|
|
||||||
$thirdParties = array_merge(
|
$thirdParties = array_merge(
|
||||||
array_filter(
|
array_filter(
|
||||||
|
array_values(
|
||||||
array_map(
|
array_map(
|
||||||
fn (ResidentialAddress $r): ?ThirdParty => $r->getHostThirdParty(),
|
fn (ResidentialAddress $r): ?ThirdParty => $r->getHostThirdParty(),
|
||||||
$this
|
$this
|
||||||
->residentialAddressRepository
|
->residentialAddressRepository
|
||||||
->findCurrentResidentialAddressByPerson($entity)
|
->findCurrentResidentialAddressByPerson($entity)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
),
|
),
|
||||||
array_filter(
|
array_filter(
|
||||||
|
array_values(
|
||||||
array_map(
|
array_map(
|
||||||
fn (PersonResource $r): ?ThirdParty => $r->getThirdParty(),
|
fn (PersonResource $r): ?ThirdParty => $r->getThirdParty(),
|
||||||
$entity->getResources()->filter(
|
$entity->getResources()->filter(
|
||||||
@ -193,6 +196,7 @@ final class PersonContext implements PersonContextInterface
|
|||||||
)->toArray()
|
)->toArray()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($options['thirdParty'] ?? false) {
|
if ($options['thirdParty'] ?? false) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user