Add new normalization methods on filters, aggregators exports and formatter by applying rector rule

This commit is contained in:
2025-03-11 22:28:42 +01:00
parent 6cb23344fc
commit 0d2a487ae7
247 changed files with 3794 additions and 42 deletions

View File

@@ -47,6 +47,21 @@ class AdministrativeLocationAggregator implements AggregatorInterface
// no form
}
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 [];

View File

@@ -40,6 +40,21 @@ class ByActionNumberAggregator implements AggregatorInterface
// No form needed
}
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 [];

View File

@@ -39,6 +39,21 @@ final readonly class ClosingDateAggregator implements AggregatorInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['frequency' => $formData['frequency']];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['frequency' => $formData['frequency']];
}
public function getFormDefaultData(): array
{
return [

View File

@@ -43,6 +43,21 @@ class ClosingMotiveAggregator implements AggregatorInterface
// no form
}
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 [];

View File

@@ -42,6 +42,21 @@ class ConfidentialAggregator implements AggregatorInterface
// no form
}
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 [];

View File

@@ -80,6 +80,21 @@ class CreatorJobAggregator implements AggregatorInterface
public function buildForm(FormBuilderInterface $builder) {}
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 [];

View File

@@ -65,6 +65,21 @@ final readonly class DurationAggregator implements AggregatorInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['precision' => $formData['precision']];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['precision' => $formData['precision']];
}
public function getFormDefaultData(): array
{
return [];

View File

@@ -42,6 +42,21 @@ class EmergencyAggregator implements AggregatorInterface
// no form
}
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 [];

View File

@@ -51,6 +51,21 @@ final readonly class EvaluationAggregator implements AggregatorInterface
// no form
}
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 [];

View File

@@ -28,6 +28,8 @@ use Symfony\Component\Form\FormBuilderInterface;
final readonly class GeographicalUnitStatAggregator implements AggregatorInterface
{
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
public function __construct(private GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private TranslatableStringHelperInterface $translatableStringHelper, private RollingDateConverterInterface $rollingDateConverter) {}
public function addRole(): ?string
@@ -123,6 +125,21 @@ final readonly class GeographicalUnitStatAggregator implements AggregatorInterfa
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['date_calc' => $formData['date_calc']->normalize(), 'level' => $this->normalizeDoctrineEntity($formData['level'])];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['date_calc' => RollingDate::fromNormalized($formData['date_calc']), 'level' => $this->denormalizeDoctrineEntity($formData['level'], $this->someRepository)];
}
public function getFormDefaultData(): array
{
return ['date_calc' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -42,6 +42,21 @@ class IntensityAggregator implements AggregatorInterface
// no form
}
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 [];

View File

@@ -74,6 +74,21 @@ final readonly class JobWorkingOnCourseAggregator implements AggregatorInterface
public function buildForm(FormBuilderInterface $builder) {}
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 [];

View File

@@ -39,6 +39,21 @@ final readonly class OpeningDateAggregator implements AggregatorInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['frequency' => $formData['frequency']];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['frequency' => $formData['frequency']];
}
public function getFormDefaultData(): array
{
return [

View File

@@ -56,6 +56,21 @@ final readonly class OriginAggregator implements AggregatorInterface
// no form
}
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 [];

View File

@@ -30,6 +30,21 @@ final readonly class PersonParticipatingAggregator implements AggregatorInterfac
// nothing to do 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 [];

View File

@@ -79,6 +79,21 @@ final readonly class ReferrerAggregator implements AggregatorInterface, DataTran
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['start_date' => $formData['start_date']->normalize(), 'end_date' => $formData['end_date']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['start_date' => RollingDate::fromNormalized($formData['start_date']), 'end_date' => RollingDate::fromNormalized($formData['end_date'])];
}
public function getFormDefaultData(): array
{
return [

View File

@@ -89,6 +89,21 @@ readonly class ReferrerScopeAggregator implements AggregatorInterface, DataTrans
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['start_date' => $formData['start_date']->normalize(), 'end_date' => $formData['end_date']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['start_date' => RollingDate::fromNormalized($formData['start_date']), 'end_date' => RollingDate::fromNormalized($formData['end_date'])];
}
public function getFormDefaultData(): array
{
return [

View File

@@ -63,6 +63,21 @@ final readonly class RequestorAggregator implements AggregatorInterface
// no form
}
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 [];

View File

@@ -47,6 +47,21 @@ final readonly class ScopeAggregator implements AggregatorInterface
// no form
}
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 [];

View File

@@ -74,6 +74,21 @@ final readonly class ScopeWorkingOnCourseAggregator implements AggregatorInterfa
public function buildForm(FormBuilderInterface $builder) {}
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 [];

View File

@@ -48,6 +48,21 @@ final readonly class SocialActionAggregator implements AggregatorInterface
// no form
}
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 [];

View File

@@ -48,6 +48,21 @@ final readonly class SocialIssueAggregator implements AggregatorInterface
// no form
}
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 [];

View File

@@ -68,6 +68,21 @@ final readonly class StepAggregator implements AggregatorInterface
$builder->add('on_date', PickRollingDateType::class, []);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['on_date' => $formData['on_date']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['on_date' => RollingDate::fromNormalized($formData['on_date'])];
}
public function getFormDefaultData(): array
{
return ['on_date' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -89,6 +89,21 @@ final readonly class UserJobAggregator implements AggregatorInterface, DataTrans
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['start_date' => $formData['start_date']->normalize(), 'end_date' => $formData['end_date']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['start_date' => RollingDate::fromNormalized($formData['start_date']), 'end_date' => RollingDate::fromNormalized($formData['end_date'])];
}
public function getFormDefaultData(): array
{
return [

View File

@@ -34,6 +34,21 @@ final readonly class UserWorkingOnCourseAggregator implements AggregatorInterfac
// 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 [];

View File

@@ -32,6 +32,21 @@ final readonly class ByClosingMotiveAggregator implements AggregatorInterface
// 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 [];

View File

@@ -39,6 +39,21 @@ final readonly class ByDateAggregator implements AggregatorInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['frequency' => $formData['frequency']];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['frequency' => $formData['frequency']];
}
public function getFormDefaultData(): array
{
return ['frequency' => DateGroupingChoiceEnum::YEAR->value];

View File

@@ -34,6 +34,21 @@ final readonly class ByStepAggregator implements AggregatorInterface
// nothing in this form
}
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 [];

View File

@@ -61,6 +61,21 @@ final class ByEndDateAggregator implements AggregatorInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['frequency' => $formData['frequency']];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['frequency' => $formData['frequency']];
}
public function getFormDefaultData(): array
{
return ['frequency' => self::DEFAULT_CHOICE];

View File

@@ -61,6 +61,21 @@ final class ByMaxDateAggregator implements AggregatorInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['frequency' => $formData['frequency']];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['frequency' => $formData['frequency']];
}
public function getFormDefaultData(): array
{
return ['frequency' => self::DEFAULT_CHOICE];

View File

@@ -61,6 +61,21 @@ final class ByStartDateAggregator implements AggregatorInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['frequency' => $formData['frequency']];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['frequency' => $formData['frequency']];
}
public function getFormDefaultData(): array
{
return ['frequency' => self::DEFAULT_CHOICE];

View File

@@ -43,6 +43,21 @@ class EvaluationTypeAggregator implements AggregatorInterface
// no form
}
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 [];

View File

@@ -43,6 +43,21 @@ class HavingEndDateAggregator implements AggregatorInterface
// No form needed
}
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 [];

View File

@@ -63,6 +63,21 @@ class ChildrenNumberAggregator implements AggregatorInterface
$builder->add('on_date', PickRollingDateType::class, []);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['on_date' => $formData['on_date']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['on_date' => RollingDate::fromNormalized($formData['on_date'])];
}
public function getFormDefaultData(): array
{
return ['on_date' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -65,6 +65,21 @@ class CompositionAggregator implements AggregatorInterface
$builder->add('on_date', PickRollingDateType::class, []);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['on_date' => $formData['on_date']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['on_date' => RollingDate::fromNormalized($formData['on_date'])];
}
public function getFormDefaultData(): array
{
return ['on_date' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -42,6 +42,21 @@ final readonly class AdministrativeStatusAggregator implements AggregatorInterfa
public function buildForm(FormBuilderInterface $builder) {}
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 [];

View File

@@ -50,6 +50,21 @@ final readonly class AgeAggregator implements AggregatorInterface, ExportElement
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['date_age_calculation' => $formData['date_age_calculation']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['date_age_calculation' => RollingDate::fromNormalized($formData['date_age_calculation'])];
}
public function getFormDefaultData(): array
{
return ['date_age_calculation' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -83,6 +83,21 @@ class ByHouseholdCompositionAggregator implements AggregatorInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['date_calc' => $formData['date_calc']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['date_calc' => RollingDate::fromNormalized($formData['date_calc'])];
}
public function getFormDefaultData(): array
{
return ['date_calc' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -36,6 +36,21 @@ final readonly class CenterAggregator implements AggregatorInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['at_date' => $formData['at_date']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['at_date' => RollingDate::fromNormalized($formData['at_date'])];
}
public function getFormDefaultData(): array
{
return [

View File

@@ -92,6 +92,21 @@ final readonly class CountryOfBirthAggregator implements AggregatorInterface, Ex
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['group_by_level' => $formData['group_by_level']];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['group_by_level' => $formData['group_by_level']];
}
public function getFormDefaultData(): array
{
return [];

View File

@@ -42,6 +42,21 @@ final readonly class EmploymentStatusAggregator implements AggregatorInterface
public function buildForm(FormBuilderInterface $builder) {}
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 [];

View File

@@ -43,6 +43,21 @@ final readonly class GenderAggregator implements AggregatorInterface
public function buildForm(FormBuilderInterface $builder) {}
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 [];

View File

@@ -26,6 +26,8 @@ use Symfony\Component\Form\FormBuilderInterface;
class GeographicalUnitAggregator implements AggregatorInterface
{
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
public function __construct(private readonly GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly RollingDateConverterInterface $rollingDateConverter) {}
public function addRole(): ?string
@@ -96,6 +98,21 @@ class GeographicalUnitAggregator implements AggregatorInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['date_calc' => $formData['date_calc']->normalize(), 'level' => $this->normalizeDoctrineEntity($formData['level'])];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['date_calc' => RollingDate::fromNormalized($formData['date_calc']), 'level' => $this->denormalizeDoctrineEntity($formData['level'], $this->someRepository)];
}
public function getFormDefaultData(): array
{
return ['date_calc' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -74,6 +74,21 @@ final readonly class HouseholdPositionAggregator implements AggregatorInterface,
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['date_position' => $formData['date_position']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['date_position' => RollingDate::fromNormalized($formData['date_position'])];
}
public function getFormDefaultData(): array
{
return ['date_position' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -47,6 +47,21 @@ final readonly class MaritalStatusAggregator implements AggregatorInterface
// no form
}
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 [];

View File

@@ -87,6 +87,21 @@ final readonly class NationalityAggregator implements AggregatorInterface, Expor
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['group_by_level' => $formData['group_by_level']];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['group_by_level' => $formData['group_by_level']];
}
public function getFormDefaultData(): array
{
return [

View File

@@ -36,6 +36,21 @@ final readonly class PostalCodeAggregator implements AggregatorInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['calc_date' => $formData['calc_date']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['calc_date' => RollingDate::fromNormalized($formData['calc_date'])];
}
public function getFormDefaultData(): array
{
return ['calc_date' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -56,6 +56,21 @@ final readonly class ActionTypeAggregator implements AggregatorInterface
// no form
}
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 [];

View File

@@ -48,6 +48,21 @@ class CreatorAggregator implements AggregatorInterface
public function buildForm(FormBuilderInterface $builder) {}
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 [];

View File

@@ -65,6 +65,21 @@ class CreatorJobAggregator implements AggregatorInterface
public function buildForm(FormBuilderInterface $builder) {}
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 [];

View File

@@ -65,6 +65,21 @@ class CreatorScopeAggregator implements AggregatorInterface
public function buildForm(FormBuilderInterface $builder) {}
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 [];

View File

@@ -46,6 +46,21 @@ class CurrentActionAggregator implements AggregatorInterface
// No form needed
}
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 [];

View File

@@ -47,6 +47,21 @@ final readonly class GoalAggregator implements AggregatorInterface
// no form
}
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 [];

View File

@@ -53,6 +53,21 @@ class GoalResultAggregator implements AggregatorInterface
// no form
}
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 [];

View File

@@ -32,6 +32,21 @@ final readonly class HandlingThirdPartyAggregator implements AggregatorInterface
// no form needed 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 [];

View File

@@ -60,6 +60,21 @@ final readonly class JobAggregator implements AggregatorInterface
public function buildForm(FormBuilderInterface $builder) {}
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 [];

View File

@@ -63,6 +63,21 @@ final readonly class ReferrerAggregator implements AggregatorInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['referrer_at' => $formData['referrer_at']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['referrer_at' => RollingDate::fromNormalized($formData['referrer_at'])];
}
public function getFormDefaultData(): array
{
return [

View File

@@ -47,6 +47,21 @@ final readonly class ResultAggregator implements AggregatorInterface
// no form
}
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 [];

View File

@@ -60,6 +60,21 @@ final readonly class ScopeAggregator implements AggregatorInterface
public function buildForm(FormBuilderInterface $builder) {}
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 [];

View File

@@ -36,6 +36,21 @@ class AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriod implements ExportInt
public function buildForm(FormBuilderInterface $builder) {}
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 [];

View File

@@ -36,6 +36,21 @@ class AvgDurationAPWorkPersonAssociatedOnWork implements ExportInterface, Groupe
public function buildForm(FormBuilderInterface $builder) {}
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 [];

View File

@@ -45,6 +45,11 @@ class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface
// Nothing to add here
}
public function getNormalizationVersion(): int
{
return 1;
}
public function getFormDefaultData(): array
{
return [];

View File

@@ -44,6 +44,21 @@ class CountAccompanyingCourseStepHistory implements ExportInterface, GroupedExpo
// 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 [];

View File

@@ -41,6 +41,21 @@ class CountAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod implements
// No form necessary?
}
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 [];

View File

@@ -41,6 +41,21 @@ class CountAccompanyingPeriodWorkAssociatePersonOnWork implements ExportInterfac
// No form necessary?
}
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 [];

View File

@@ -37,6 +37,21 @@ class CountEvaluation implements ExportInterface, GroupedExportInterface
public function buildForm(FormBuilderInterface $builder) {}
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 [];

View File

@@ -49,6 +49,21 @@ class CountHouseholdInPeriod implements ExportInterface, GroupedExportInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['calc_date' => $formData['calc_date']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['calc_date' => RollingDate::fromNormalized($formData['calc_date'])];
}
public function getFormDefaultData(): array
{
return ['calc_date' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -39,6 +39,21 @@ class CountPerson implements ExportInterface, GroupedExportInterface
// No form necessary
}
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 [];

View File

@@ -41,6 +41,21 @@ class CountPersonOnAccompanyingPeriodWorkAssociatePersonOnWork implements Export
// No form necessary?
}
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 [];

View File

@@ -43,6 +43,21 @@ class CountPersonWithAccompanyingCourse implements ExportInterface, GroupedExpor
// TODO: Implement buildForm() method.
}
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 [];

View File

@@ -46,6 +46,21 @@ final readonly class ListAccompanyingPeriod implements ListInterface, GroupedExp
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['calc_date' => $formData['calc_date']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['calc_date' => RollingDate::fromNormalized($formData['calc_date'])];
}
public function getFormDefaultData(): array
{
return [

View File

@@ -103,6 +103,21 @@ final readonly class ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeri
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['calc_date' => $formData['calc_date']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['calc_date' => RollingDate::fromNormalized($formData['calc_date'])];
}
public function getFormDefaultData(): array
{
return ['calc_date' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -103,6 +103,21 @@ final readonly class ListAccompanyingPeriodWorkAssociatePersonOnWork implements
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['calc_date' => $formData['calc_date']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['calc_date' => RollingDate::fromNormalized($formData['calc_date'])];
}
public function getFormDefaultData(): array
{
return ['calc_date' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -93,6 +93,21 @@ final readonly class ListEvaluation implements ListInterface, GroupedExportInter
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['calc_date' => $formData['calc_date']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['calc_date' => RollingDate::fromNormalized($formData['calc_date'])];
}
public function getFormDefaultData(): array
{
return ['calc_date' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -67,6 +67,21 @@ class ListHouseholdInPeriod implements ListInterface, GroupedExportInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['calc_date' => $formData['calc_date']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['calc_date' => RollingDate::fromNormalized($formData['calc_date'])];
}
public function getFormDefaultData(): array
{
return ['calc_date' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -33,6 +33,7 @@ use Symfony\Component\Form\FormBuilderInterface;
*/
class ListPerson implements ListInterface, GroupedExportInterface
{
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
private array $slugs = [];
private readonly bool $filterStatsByCenters;
@@ -56,6 +57,21 @@ class ListPerson implements ListInterface, GroupedExportInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['address_date' => $this->normalizeDate($formData['address_date'])];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['address_date' => $this->denormalizeDate($formData['address_date'])];
}
public function getFormDefaultData(): array
{
return ['address_date' => new \DateTimeImmutable()];

View File

@@ -65,6 +65,21 @@ class ListPersonDuplicate implements DirectExportInterface, ExportElementValidat
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['precision' => $formData['precision']];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['precision' => $formData['precision']];
}
public function getFormDefaultData(): array
{
return ['precision' => self::PRECISION_DEFAULT_VALUE];

View File

@@ -56,6 +56,21 @@ final readonly class ListPersonHavingAccompanyingPeriod implements ListInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['address_date_rolling' => $formData['address_date_rolling']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['address_date_rolling' => RollingDate::fromNormalized($formData['address_date_rolling'])];
}
public function getFormDefaultData(): array
{
return ['address_date_rolling' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -51,6 +51,21 @@ final readonly class ListPersonWithAccompanyingPeriodDetails implements ListInte
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['address_date' => $formData['address_date']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['address_date' => RollingDate::fromNormalized($formData['address_date'])];
}
public function getFormDefaultData(): array
{
return ['address_date' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -51,6 +51,21 @@ final readonly class StatAccompanyingCourseDuration implements ExportInterface,
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['closingdate_rolling' => $formData['closingdate_rolling']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['closingdate_rolling' => RollingDate::fromNormalized($formData['closingdate_rolling'])];
}
public function getFormDefaultData(): array
{
return ['closingdate_rolling' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -65,6 +65,21 @@ class ActiveOnDateFilter implements FilterInterface
->add('on_date', PickRollingDateType::class, []);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['on_date' => $formData['on_date']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['on_date' => RollingDate::fromNormalized($formData['on_date'])];
}
public function getFormDefaultData(): array
{
return ['on_date' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -55,6 +55,21 @@ class ActiveOneDayBetweenDatesFilter implements FilterInterface
->add('date_to', PickRollingDateType::class, []);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['date_from' => $formData['date_from']->normalize(), 'date_to' => $formData['date_to']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['date_from' => RollingDate::fromNormalized($formData['date_from']), 'date_to' => RollingDate::fromNormalized($formData['date_to'])];
}
public function getFormDefaultData(): array
{
return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -20,6 +20,8 @@ use Symfony\Component\Form\FormBuilderInterface;
class AdministrativeLocationFilter implements FilterInterface
{
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
public function addRole(): ?string
@@ -48,6 +50,21 @@ class AdministrativeLocationFilter implements FilterInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['accepted_locations' => $this->normalizeDoctrineEntity($formData['accepted_locations'])];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['accepted_locations' => $this->denormalizeDoctrineEntity($formData['accepted_locations'], $this->someRepository)];
}
public function getFormDefaultData(): array
{
return [];

View File

@@ -22,6 +22,8 @@ use Symfony\Component\Form\FormBuilderInterface;
class ClosingMotiveFilter implements FilterInterface
{
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
public function addRole(): ?string
@@ -59,6 +61,21 @@ class ClosingMotiveFilter implements FilterInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['accepted_closingmotives' => $this->normalizeDoctrineEntity($formData['accepted_closingmotives'])];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['accepted_closingmotives' => $this->denormalizeDoctrineEntity($formData['accepted_closingmotives'], $this->someRepository)];
}
public function getFormDefaultData(): array
{
return [];

View File

@@ -65,6 +65,21 @@ class ConfidentialFilter implements FilterInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['accepted_confidentials' => $formData['accepted_confidentials']];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['accepted_confidentials' => $formData['accepted_confidentials']];
}
public function getFormDefaultData(): array
{
return ['accepted_confidentials' => self::DEFAULT_CHOICE];

View File

@@ -21,6 +21,8 @@ use Symfony\Component\Form\FormBuilderInterface;
class CreatorFilter implements FilterInterface
{
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
public function addRole(): ?string
{
return null;
@@ -51,6 +53,21 @@ class CreatorFilter implements FilterInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['accepted_creators' => $this->normalizeDoctrineEntity($formData['accepted_creators'])];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['accepted_creators' => $this->denormalizeDoctrineEntity($formData['accepted_creators'], $this->someRepository)];
}
public function getFormDefaultData(): array
{
return [];

View File

@@ -24,6 +24,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class CreatorJobFilter implements FilterInterface
{
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
private const PREFIX = 'acp_filter_creator_job';
public function __construct(
@@ -98,6 +99,21 @@ class CreatorJobFilter implements FilterInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['creator_job' => $this->normalizeDoctrineEntity($formData['creator_job'])];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['creator_job' => $this->denormalizeDoctrineEntity($formData['creator_job'], $this->someRepository)];
}
public function describeAction($data, $format = 'string'): array
{
$creatorJobs = [];

View File

@@ -65,6 +65,21 @@ class EmergencyFilter implements FilterInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['accepted_emergency' => $formData['accepted_emergency']];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['accepted_emergency' => $formData['accepted_emergency']];
}
public function getFormDefaultData(): array
{
return ['accepted_emergency' => self::DEFAULT_CHOICE];

View File

@@ -22,6 +22,8 @@ use Symfony\Component\Form\FormBuilderInterface;
class EvaluationFilter implements FilterInterface
{
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
public function __construct(private readonly EvaluationRepositoryInterface $evaluationRepository, private readonly TranslatableStringHelper $translatableStringHelper) {}
public function addRole(): ?string
@@ -65,6 +67,21 @@ class EvaluationFilter implements FilterInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['accepted_evaluations' => $this->normalizeDoctrineEntity($formData['accepted_evaluations'])];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['accepted_evaluations' => $this->denormalizeDoctrineEntity($formData['accepted_evaluations'], $this->someRepository)];
}
public function getFormDefaultData(): array
{
return [];

View File

@@ -39,6 +39,21 @@ class HasNoActionFilter implements FilterInterface
// no form
}
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 [];

View File

@@ -62,6 +62,21 @@ class HasNoReferrerFilter implements FilterInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['calc_date' => $formData['calc_date']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['calc_date' => RollingDate::fromNormalized($formData['calc_date'])];
}
public function getFormDefaultData(): array
{
return ['calc_date' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -73,6 +73,21 @@ class HasTemporaryLocationFilter implements FilterInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['having_temporarily' => $formData['having_temporarily'], 'calc_date' => $formData['calc_date']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['having_temporarily' => $formData['having_temporarily'], 'calc_date' => RollingDate::fromNormalized($formData['calc_date'])];
}
public function getFormDefaultData(): array
{
return ['calc_date' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -42,6 +42,21 @@ final readonly class HavingAnAccompanyingPeriodInfoWithinDatesFilter implements
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['start_date' => $formData['start_date']->normalize(), 'end_date' => $formData['end_date']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['start_date' => RollingDate::fromNormalized($formData['start_date']), 'end_date' => RollingDate::fromNormalized($formData['end_date'])];
}
public function getFormDefaultData(): array
{
return ['start_date' => new RollingDate(RollingDate::T_TODAY), 'end_date' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -65,6 +65,21 @@ class IntensityFilter implements FilterInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['accepted_intensities' => $formData['accepted_intensities']];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['accepted_intensities' => $formData['accepted_intensities']];
}
public function getFormDefaultData(): array
{
return ['accepted_intensities' => self::DEFAULT_CHOICE];

View File

@@ -33,6 +33,7 @@ use Symfony\Component\Form\FormBuilderInterface;
*/
readonly class JobWorkingOnCourseFilter implements FilterInterface
{
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
private const PREFIX = 'acp_filter_user_job_working_on_course';
public function __construct(
@@ -105,6 +106,21 @@ readonly class JobWorkingOnCourseFilter implements FilterInterface
;
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['jobs' => $this->normalizeDoctrineEntity($formData['jobs']), 'start_date' => $formData['start_date']->normalize(), 'end_date' => $formData['end_date']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['jobs' => $this->denormalizeDoctrineEntity($formData['jobs'], $this->someRepository), 'start_date' => RollingDate::fromNormalized($formData['start_date']), 'end_date' => RollingDate::fromNormalized($formData['end_date'])];
}
public function describeAction($data, $format = 'string'): array
{
return [

View File

@@ -40,6 +40,21 @@ final readonly class NotAssociatedWithAReferenceAddressFilter implements FilterI
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['date_calc' => $formData['date_calc']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['date_calc' => RollingDate::fromNormalized($formData['date_calc'])];
}
public function getFormDefaultData(): array
{
return [

View File

@@ -53,6 +53,21 @@ class OpenBetweenDatesFilter implements FilterInterface
->add('date_to', PickRollingDateType::class, []);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['date_from' => $formData['date_from']->normalize(), 'date_to' => $formData['date_to']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['date_from' => RollingDate::fromNormalized($formData['date_from']), 'date_to' => RollingDate::fromNormalized($formData['date_to'])];
}
public function getFormDefaultData(): array
{
return ['date_from' => new RollingDate(RollingDate::T_MONTH_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)];

View File

@@ -22,6 +22,8 @@ use Symfony\Component\Form\FormBuilderInterface;
class OriginFilter implements FilterInterface
{
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
public function addRole(): ?string
@@ -59,6 +61,21 @@ class OriginFilter implements FilterInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['accepted_origins' => $this->normalizeDoctrineEntity($formData['accepted_origins'])];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['accepted_origins' => $this->denormalizeDoctrineEntity($formData['accepted_origins'], $this->someRepository)];
}
public function getFormDefaultData(): array
{
return [];

View File

@@ -22,6 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class ReferrerFilter implements FilterInterface
{
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
private const A = 'acp_referrer_filter_uhistory';
private const P = 'acp_referrer_filter_date';
@@ -75,6 +76,21 @@ class ReferrerFilter implements FilterInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['accepted_referrers' => $this->normalizeDoctrineEntity($formData['accepted_referrers']), 'date_calc' => $formData['date_calc']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['accepted_referrers' => $this->denormalizeDoctrineEntity($formData['accepted_referrers'], $this->someRepository), 'date_calc' => RollingDate::fromNormalized($formData['date_calc'])];
}
public function getFormDefaultData(): array
{
return ['date_calc' => new RollingDate(RollingDate::T_TODAY), 'accepted_referrers' => []];

View File

@@ -32,6 +32,7 @@ use Symfony\Component\Form\FormBuilderInterface;
*/
final readonly class ReferrerFilterBetweenDates implements FilterInterface
{
use \Chill\MainBundle\Export\ExportDataNormalizerTrait;
private const A = 'acp_referrer_filter_uhistory';
private const P = 'acp_referrer_filter_date_start';
@@ -90,6 +91,21 @@ final readonly class ReferrerFilterBetweenDates implements FilterInterface
]);
}
public function getNormalizationVersion(): int
{
return 1;
}
public function normalizeFormData(array $formData): array
{
return ['accepted_referrers' => $this->normalizeDoctrineEntity($formData['accepted_referrers']), 'start_date' => $formData['start_date']->normalize(), 'end_date' => $formData['end_date']->normalize()];
}
public function denormalizeFormData(array $formData, int $fromVersion): array
{
return ['accepted_referrers' => $this->denormalizeDoctrineEntity($formData['accepted_referrers'], $this->someRepository), 'start_date' => RollingDate::fromNormalized($formData['start_date']), 'end_date' => RollingDate::fromNormalized($formData['end_date'])];
}
public function getFormDefaultData(): array
{
return [

Some files were not shown because too many files have changed in this diff Show More