mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Feature: allow filtering for users in the public form for docgen acc course - php code fix
This commit is contained in:
parent
1167ff25b1
commit
3927a7f62b
@ -137,6 +137,7 @@ class ListActivitiesByAccompanyingPeriodContext implements
|
||||
public function contextGenerationDataNormalize(DocGeneratorTemplate $template, $entity, array $data): array
|
||||
{
|
||||
$normalized = $this->accompanyingPeriodContext->contextGenerationDataNormalize($template, $entity, $data);
|
||||
|
||||
foreach (['myActivitiesOnly', 'myWorksOnly'] as $k) {
|
||||
$normalized[$k] = null !== ($data[$k] ?? null) ? $data[$k] : false;
|
||||
}
|
||||
@ -191,6 +192,7 @@ class ListActivitiesByAccompanyingPeriodContext implements
|
||||
if ($myWorksOnly) {
|
||||
$data['course']['works'] = $this->filterWorksByCurrentUser($data['course']['works']);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user