Partage d'export enregistré et génération asynchrone des exports

This commit is contained in:
2025-07-08 13:53:25 +00:00
parent c4cc0baa8e
commit 8bc16dadb0
447 changed files with 14134 additions and 3854 deletions

View File

@@ -27,17 +27,32 @@ final readonly class PersonsAggregator implements AggregatorInterface
public function __construct(private LabelPersonHelper $labelPersonHelper) {}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
// nothing to add here
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return [];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return [];
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, mixed $data)
public function getLabels($key, array $values, mixed $data): callable
{
if ($key !== self::PREFIX.'_pid') {
throw new \UnexpectedValueException('this key should not be handled: '.$key);
@@ -46,12 +61,12 @@ final readonly class PersonsAggregator implements AggregatorInterface
return $this->labelPersonHelper->getLabel($key, $values, 'export.aggregator.activity.by_persons.Persons');
}
public function getQueryKeys($data)
public function getQueryKeys($data): array
{
return [self::PREFIX.'_pid'];
}
public function getTitle()
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
{
return 'export.aggregator.activity.by_persons.Group activity by persons';
}
@@ -61,7 +76,7 @@ final readonly class PersonsAggregator implements AggregatorInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
{
$p = self::PREFIX;
@@ -71,7 +86,7 @@ final readonly class PersonsAggregator implements AggregatorInterface
->addGroupBy("{$p}_pid");
}
public function applyOn()
public function applyOn(): string
{
return Declarations::ACTIVITY;
}