execute rector run on filters and aggregators

This commit is contained in:
2023-06-18 21:36:40 +02:00
parent 50de389bc7
commit 21f11fb034
179 changed files with 741 additions and 118 deletions

View File

@@ -57,6 +57,10 @@ class AdministrativeLocationAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -39,6 +39,10 @@ class ByActionNumberAggregator implements AggregatorInterface
{
// No form needed
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -52,6 +52,10 @@ class ClosingMotiveAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -48,6 +48,10 @@ class ConfidentialAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -57,6 +57,10 @@ class CreatorJobAggregator implements AggregatorInterface
{
// No form needed
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -84,6 +84,10 @@ final class DurationAggregator implements AggregatorInterface
'expanded' => true,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -48,6 +48,10 @@ class EmergencyAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -61,6 +61,10 @@ final class EvaluationAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -121,7 +121,6 @@ final class GeographicalUnitStatAggregator implements AggregatorInterface
->add('date_calc', PickRollingDateType::class, [
'label' => 'Compute geographical location at date',
'required' => true,
'data' => new RollingDate(RollingDate::T_TODAY),
])
->add('level', EntityType::class, [
'label' => 'Geographical layer',
@@ -133,6 +132,10 @@ final class GeographicalUnitStatAggregator implements AggregatorInterface
'expanded' => true,
]);
}
public function getFormDefaultData(): array
{
return ['date_calc' => new RollingDate(RollingDate::T_TODAY)];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -48,6 +48,10 @@ class IntensityAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -59,6 +59,10 @@ final class OriginAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -81,11 +81,14 @@ final class ReferrerAggregator implements AggregatorInterface
{
$builder
->add('date_calc', PickRollingDateType::class, [
'data' => new RollingDate(RollingDate::T_TODAY),
'label' => 'export.aggregator.course.by_referrer.Computation date for referrer',
'required' => true,
]);
}
public function getFormDefaultData(): array
{
return ['date_calc' => new RollingDate(RollingDate::T_TODAY)];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -88,11 +88,14 @@ class ReferrerScopeAggregator implements AggregatorInterface
public function buildForm(FormBuilderInterface $builder)
{
$builder->add('date_calc', PickRollingDateType::class, [
'data' => new RollingDate(RollingDate::T_TODAY),
'label' => 'export.aggregator.course.by_user_scope.Computation date for referrer',
'required' => true,
]);
}
public function getFormDefaultData(): array
{
return ['date_calc' => new RollingDate(RollingDate::T_TODAY)];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -69,6 +69,10 @@ final class RequestorAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -57,6 +57,10 @@ final class ScopeAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -58,6 +58,10 @@ final class SocialActionAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -58,6 +58,10 @@ final class SocialIssueAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -76,9 +76,11 @@ final class StepAggregator implements AggregatorInterface
public function buildForm(FormBuilderInterface $builder)
{
$builder->add('on_date', PickRollingDateType::class, [
'data' => new RollingDate(RollingDate::T_TODAY),
]);
$builder->add('on_date', PickRollingDateType::class, []);
}
public function getFormDefaultData(): array
{
return ['on_date' => new RollingDate(RollingDate::T_TODAY)];
}
public function getLabels($key, array $values, $data)

View File

@@ -57,6 +57,10 @@ final class UserJobAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -75,9 +75,12 @@ class ByEndDateAggregator implements AggregatorInterface
'multiple' => false,
'expanded' => true,
'empty_data' => self::DEFAULT_CHOICE,
'data' => self::DEFAULT_CHOICE,
]);
}
public function getFormDefaultData(): array
{
return ['frequency' => self::DEFAULT_CHOICE];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -75,9 +75,12 @@ class ByMaxDateAggregator implements AggregatorInterface
'multiple' => false,
'expanded' => true,
'empty_data' => self::DEFAULT_CHOICE,
'data' => self::DEFAULT_CHOICE,
]);
}
public function getFormDefaultData(): array
{
return ['frequency' => self::DEFAULT_CHOICE];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -75,9 +75,12 @@ class ByStartDateAggregator implements AggregatorInterface
'multiple' => false,
'expanded' => true,
'empty_data' => self::DEFAULT_CHOICE,
'data' => self::DEFAULT_CHOICE,
]);
}
public function getFormDefaultData(): array
{
return ['frequency' => self::DEFAULT_CHOICE];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -52,6 +52,10 @@ class EvaluationTypeAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -48,6 +48,10 @@ class HavingEndDateAggregator implements AggregatorInterface
{
// No form needed
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -72,9 +72,11 @@ class ChildrenNumberAggregator implements AggregatorInterface
public function buildForm(FormBuilderInterface $builder)
{
$builder->add('on_date', PickRollingDateType::class, [
'data' => new RollingDate(RollingDate::T_TODAY),
]);
$builder->add('on_date', PickRollingDateType::class, []);
}
public function getFormDefaultData(): array
{
return ['on_date' => new RollingDate(RollingDate::T_TODAY)];
}
public function getLabels($key, array $values, $data)

View File

@@ -77,9 +77,11 @@ class CompositionAggregator implements AggregatorInterface
public function buildForm(FormBuilderInterface $builder)
{
$builder->add('on_date', PickRollingDateType::class, [
'data' => new RollingDate(RollingDate::T_TODAY),
]);
$builder->add('on_date', PickRollingDateType::class, []);
}
public function getFormDefaultData(): array
{
return ['on_date' => new RollingDate(RollingDate::T_TODAY)];
}
public function getLabels($key, array $values, $data)

View File

@@ -50,12 +50,15 @@ final class AgeAggregator implements AggregatorInterface, ExportElementValidated
{
$builder->add('date_age_calculation', DateType::class, [
'label' => 'Calculate age in relation to this date',
'data' => new DateTime(),
'attr' => ['class' => 'datepicker'],
'widget' => 'single_text',
'format' => 'dd-MM-yyyy',
]);
}
public function getFormDefaultData(): array
{
return ['date_age_calculation' => new DateTime()];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -94,9 +94,12 @@ class ByHouseholdCompositionAggregator implements AggregatorInterface
{
$builder->add('date_calc', PickRollingDateType::class, [
'label' => 'export.aggregator.person.by_household_composition.Calc date',
'data' => new RollingDate(RollingDate::T_TODAY),
]);
}
public function getFormDefaultData(): array
{
return ['date_calc' => new RollingDate(RollingDate::T_TODAY)];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -108,6 +108,10 @@ final class CountryOfBirthAggregator implements AggregatorInterface, ExportEleme
'multiple' => false,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -48,6 +48,10 @@ final class GenderAggregator implements AggregatorInterface
public function buildForm(FormBuilderInterface $builder)
{
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -93,7 +93,6 @@ class GeographicalUnitAggregator implements AggregatorInterface
->add('date_calc', PickRollingDateType::class, [
'label' => 'Address valid at this date',
'required' => true,
'data' => new RollingDate(RollingDate::T_TODAY),
])
->add('level', EntityType::class, [
'label' => 'Geographical layer',
@@ -105,6 +104,10 @@ class GeographicalUnitAggregator implements AggregatorInterface
'expanded' => true,
]);
}
public function getFormDefaultData(): array
{
return ['date_calc' => new RollingDate(RollingDate::T_TODAY)];
}
public static function getDefaultAlias(): string
{

View File

@@ -90,9 +90,12 @@ final class HouseholdPositionAggregator implements AggregatorInterface, ExportEl
{
$builder->add('date_position', PickRollingDateType::class, [
'label' => 'Household position in relation to this date',
'data' => new RollingDate(RollingDate::T_TODAY),
]);
}
public function getFormDefaultData(): array
{
return ['date_position' => new RollingDate(RollingDate::T_TODAY)];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -75,6 +75,10 @@ final class ActionTypeAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -51,6 +51,10 @@ class CurrentActionAggregator implements AggregatorInterface
{
// No form needed
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -55,6 +55,10 @@ final class GoalAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -68,6 +68,10 @@ class GoalResultAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -57,6 +57,10 @@ final class JobAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -57,6 +57,10 @@ final class ReferrerAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -55,6 +55,10 @@ final class ResultAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -57,6 +57,10 @@ final class ScopeAggregator implements AggregatorInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{

View File

@@ -39,6 +39,10 @@ class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface
{
// Nothing to add here
}
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes(): array
{

View File

@@ -38,6 +38,10 @@ class CountAccompanyingPeriodWork implements ExportInterface, GroupedExportInter
{
// No form necessary?
}
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes(): array
{

View File

@@ -37,6 +37,10 @@ class CountEvaluation implements ExportInterface, GroupedExportInterface
{
// TODO: Implement buildForm() method.
}
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes(): array
{

View File

@@ -46,11 +46,14 @@ class CountHousehold implements ExportInterface, GroupedExportInterface
{
$builder
->add('calc_date', PickRollingDateType::class, [
'data' => new RollingDate(RollingDate::T_TODAY),
'label' => self::TR_PREFIX . 'Date of calculation of household members',
'required' => false,
]);
}
public function getFormDefaultData(): array
{
return ['calc_date' => new RollingDate(RollingDate::T_TODAY)];
}
public function getAllowedFormattersTypes(): array
{

View File

@@ -39,6 +39,10 @@ class CountPersonWithAccompanyingCourse implements ExportInterface, GroupedExpor
{
// TODO: Implement buildForm() method.
}
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes(): array
{

View File

@@ -144,6 +144,10 @@ class ListAccompanyingPeriod implements ListInterface, GroupedExportInterface
'required' => true,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes()
{

View File

@@ -135,9 +135,12 @@ class ListAccompanyingPeriodWork implements ListInterface, GroupedExportInterfac
'label' => 'export.list.acpw.Date of calculation for associated elements',
'help' => 'export.list.acpw.help_description',
'required' => true,
'data' => new RollingDate(RollingDate::T_TODAY),
]);
}
public function getFormDefaultData(): array
{
return ['calc_date' => new RollingDate(RollingDate::T_TODAY)];
}
public function getAllowedFormattersTypes()
{

View File

@@ -123,9 +123,12 @@ class ListEvaluation implements ListInterface, GroupedExportInterface
'label' => 'export.list.eval.Date of calculation for associated elements',
'help' => 'export.list.eval.help_description',
'required' => true,
'data' => new RollingDate(RollingDate::T_TODAY),
]);
}
public function getFormDefaultData(): array
{
return ['calc_date' => new RollingDate(RollingDate::T_TODAY)];
}
public function getAllowedFormattersTypes()
{

View File

@@ -75,10 +75,13 @@ class ListHouseholdInPeriod implements ListInterface, GroupedExportInterface
->add('calc_date', PickRollingDateType::class, [
'label' => 'export.list.household.Date of calculation for associated elements',
'help' => 'export.list.household.help_description',
'data' => new RollingDate(RollingDate::T_TODAY),
'required' => true,
]);
}
public function getFormDefaultData(): array
{
return ['calc_date' => new RollingDate(RollingDate::T_TODAY)];
}
public function getAllowedFormattersTypes()
{

View File

@@ -74,9 +74,12 @@ class ListPersonDuplicate implements DirectExportInterface, ExportElementValidat
{
$builder->add('precision', NumberType::class, [
'label' => 'Precision',
'data' => self::PRECISION_DEFAULT_VALUE,
]);
}
public function getFormDefaultData(): array
{
return ['precision' => self::PRECISION_DEFAULT_VALUE];
}
public function generate(array $acl, array $data = []): Response
{

View File

@@ -57,7 +57,6 @@ class ListPersonWithAccompanyingPeriod implements ExportElementValidatedInterfac
{
$choices = array_combine(ListPersonHelper::FIELDS, ListPersonHelper::FIELDS);
// Add a checkbox to select fields
$builder->add('fields', ChoiceType::class, [
'multiple' => true,
'expanded' => true,
@@ -80,17 +79,20 @@ class ListPersonWithAccompanyingPeriod implements ExportElementValidatedInterfac
}
},
])],
'data' => array_values($choices),
]);
// add a date field for addresses
$builder->add('address_date', ChillDateType::class, [
'label' => 'Data valid at this date',
'help' => 'Data regarding center, addresses, and so on will be computed at this date',
'data' => new DateTimeImmutable(),
'input' => 'datetime_immutable',
]);
}
public function getFormDefaultData(): array
{
$choices = array_combine(ListPersonHelper::FIELDS, ListPersonHelper::FIELDS);
return ['fields' => array_values($choices), 'address_date' => new DateTimeImmutable()];
}
public function getAllowedFormattersTypes()
{

View File

@@ -41,9 +41,12 @@ class StatAccompanyingCourseDuration implements ExportInterface, GroupedExportIn
{
$builder->add('closingdate', ChillDateType::class, [
'label' => 'Closingdate to apply',
'data' => new DateTime('now'),
]);
}
public function getFormDefaultData(): array
{
return ['closingdate' => new DateTime('now')];
}
public function getAllowedFormattersTypes(): array
{

View File

@@ -67,9 +67,11 @@ class ActiveOnDateFilter implements FilterInterface
public function buildForm(FormBuilderInterface $builder)
{
$builder
->add('on_date', PickRollingDateType::class, [
'data' => new RollingDate(RollingDate::T_TODAY),
]);
->add('on_date', PickRollingDateType::class, []);
}
public function getFormDefaultData(): array
{
return ['on_date' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string'): array

View File

@@ -56,12 +56,12 @@ class ActiveOneDayBetweenDatesFilter implements FilterInterface
public function buildForm(FormBuilderInterface $builder)
{
$builder
->add('date_from', PickRollingDateType::class, [
'data' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START),
])
->add('date_to', PickRollingDateType::class, [
'data' => new RollingDate(RollingDate::T_TODAY),
]);
->add('date_from', PickRollingDateType::class, [])
->add('date_to', PickRollingDateType::class, []);
}
public function getFormDefaultData(): array
{
return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string'): array

View File

@@ -53,6 +53,10 @@ class AdministrativeLocationFilter implements FilterInterface
'multiple' => true,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -64,6 +64,10 @@ class ClosingMotiveFilter implements FilterInterface
'expanded' => true,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -22,8 +22,8 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class ConfidentialFilter implements FilterInterface
{
private const CHOICES = [
'is not confidential' => false,
'is confidential' => true,
'is not confidential' => 'false',
'is confidential' => 'true',
];
private const DEFAULT_CHOICE = 'false';
@@ -67,9 +67,12 @@ class ConfidentialFilter implements FilterInterface
'multiple' => false,
'expanded' => true,
'empty_data' => self::DEFAULT_CHOICE,
'data' => self::DEFAULT_CHOICE,
]);
}
public function getFormDefaultData(): array
{
return ['accepted_confidentials' => self::DEFAULT_CHOICE];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -50,6 +50,10 @@ class CreatorFilter implements FilterInterface
'label' => false,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -69,6 +69,10 @@ class CreatorJobFilter implements FilterInterface
'label' => 'Job',
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -22,8 +22,8 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class EmergencyFilter implements FilterInterface
{
private const CHOICES = [
'is emergency' => true,
'is not emergency' => false,
'is emergency' => 'true',
'is not emergency' => 'false',
];
private const DEFAULT_CHOICE = 'false';
@@ -67,9 +67,12 @@ class EmergencyFilter implements FilterInterface
'multiple' => false,
'expanded' => true,
'empty_data' => self::DEFAULT_CHOICE,
'data' => self::DEFAULT_CHOICE,
]);
}
public function getFormDefaultData(): array
{
return ['accepted_emergency' => self::DEFAULT_CHOICE];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -75,6 +75,10 @@ class EvaluationFilter implements FilterInterface
'attr' => ['class' => 'select2'],
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -100,7 +100,6 @@ class GeographicalUnitStatFilter implements FilterInterface
->add('date_calc', PickRollingDateType::class, [
'label' => 'Compute geographical location at date',
'required' => true,
'data' => new RollingDate(RollingDate::T_TODAY),
])
->add('units', ChoiceType::class, [
'label' => 'Geographical unit',
@@ -114,6 +113,10 @@ class GeographicalUnitStatFilter implements FilterInterface
'multiple' => true,
]);
}
public function getFormDefaultData(): array
{
return ['date_calc' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -38,6 +38,10 @@ class HasNoActionFilter implements FilterInterface
{
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -65,9 +65,12 @@ class HasNoReferrerFilter implements FilterInterface
$builder
->add('calc_date', PickRollingDateType::class, [
'label' => 'Has no referrer on this date',
'data' => new RollingDate(RollingDate::T_TODAY),
]);
}
public function getFormDefaultData(): array
{
return ['calc_date' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -92,9 +92,12 @@ class HasTemporaryLocationFilter implements FilterInterface
])
->add('calc_date', PickRollingDateType::class, [
'label' => 'export.filter.course.having_temporarily.Calculation date',
'data' => new RollingDate(RollingDate::T_TODAY),
]);
}
public function getFormDefaultData(): array
{
return ['calc_date' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -38,13 +38,14 @@ final readonly class HavingAnAccompanyingPeriodInfoWithinDatesFilter implements
$builder
->add('start_date', PickRollingDateType::class, [
'label' => 'export.filter.course.having_info_within_interval.start_date',
'data' => new RollingDate(RollingDate::T_TODAY),
])
->add('end_date', PickRollingDateType::class, [
'label' => 'export.filter.course.having_info_within_interval.end_date',
'data' => new RollingDate(RollingDate::T_TODAY),
])
;
]);
}
public function getFormDefaultData(): array
{
return ['start_date' => new RollingDate(RollingDate::T_TODAY), 'end_date' => new RollingDate(RollingDate::T_TODAY)];
}
public function getTitle(): string

View File

@@ -67,9 +67,12 @@ class IntensityFilter implements FilterInterface
'multiple' => false,
'expanded' => true,
'empty_data' => self::DEFAULT_CHOICE,
'data' => self::DEFAULT_CHOICE,
]);
}
public function getFormDefaultData(): array
{
return ['accepted_intensities' => self::DEFAULT_CHOICE];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -54,12 +54,12 @@ class OpenBetweenDatesFilter implements FilterInterface
public function buildForm(FormBuilderInterface $builder)
{
$builder
->add('date_from', PickRollingDateType::class, [
'data' => new RollingDate(RollingDate::T_MONTH_PREVIOUS_START),
])
->add('date_to', PickRollingDateType::class, [
'data' => new RollingDate(RollingDate::T_TODAY),
]);
->add('date_from', PickRollingDateType::class, [])
->add('date_to', PickRollingDateType::class, []);
}
public function getFormDefaultData(): array
{
return ['date_from' => new RollingDate(RollingDate::T_MONTH_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string'): array

View File

@@ -64,6 +64,10 @@ class OriginFilter implements FilterInterface
'expanded' => true,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -77,11 +77,14 @@ class ReferrerFilter implements FilterInterface
'multiple' => true,
])
->add('date_calc', PickRollingDateType::class, [
'data' => new RollingDate(RollingDate::T_TODAY),
'label' => 'export.filter.course.by_referrer.Computation date for referrer',
'required' => true,
]);
}
public function getFormDefaultData(): array
{
return ['date_calc' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -126,9 +126,12 @@ final class RequestorFilter implements FilterInterface
'multiple' => false,
'expanded' => true,
'empty_data' => self::DEFAULT_CHOICE,
'data' => self::DEFAULT_CHOICE,
]);
}
public function getFormDefaultData(): array
{
return ['accepted_choices' => self::DEFAULT_CHOICE];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -70,6 +70,10 @@ class SocialActionFilter implements FilterInterface
'multiple' => true,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -69,6 +69,10 @@ class SocialIssueFilter implements FilterInterface
'multiple' => true,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -95,13 +95,15 @@ class StepFilter implements FilterInterface
'multiple' => false,
'expanded' => true,
'empty_data' => self::DEFAULT_CHOICE,
'data' => self::DEFAULT_CHOICE,
])
->add('calc_date', PickRollingDateType::class, [
'label' => 'export.filter.course.by_step.date_calc',
'data' => new RollingDate(RollingDate::T_TODAY),
]);
}
public function getFormDefaultData(): array
{
return ['accepted_steps' => self::DEFAULT_CHOICE, 'calc_date' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -96,11 +96,14 @@ class UserJobFilter implements FilterInterface
'label' => 'Job',
])
->add('date_calc', PickRollingDateType::class, [
'data' => new RollingDate(RollingDate::T_TODAY),
'label' => 'export.filter.course.by_user_scope.Computation date for referrer',
'required' => true,
]);
}
public function getFormDefaultData(): array
{
return ['date_calc' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -100,11 +100,14 @@ class UserScopeFilter implements FilterInterface
'expanded' => true,
])
->add('date_calc', PickRollingDateType::class, [
'data' => new RollingDate(RollingDate::T_TODAY),
'label' => 'export.filter.course.by_user_scope.Computation date for referrer',
'required' => true,
]);
}
public function getFormDefaultData(): array
{
return ['date_calc' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -42,6 +42,10 @@ readonly class UserWorkingOnCourseFilter implements FilterInterface
'multiple' => true,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function getTitle(): string
{

View File

@@ -57,13 +57,15 @@ class ByEndDateFilter implements FilterInterface
$builder
->add('start_date', PickRollingDateType::class, [
'label' => 'start period date',
'data' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START),
])
->add('end_date', PickRollingDateType::class, [
'label' => 'end period date',
'data' => new RollingDate(RollingDate::T_TODAY),
]);
}
public function getFormDefaultData(): array
{
return ['start_date' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'end_date' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -57,13 +57,15 @@ class ByStartDateFilter implements FilterInterface
$builder
->add('start_date', PickRollingDateType::class, [
'label' => 'start period date',
'data' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START),
])
->add('end_date', PickRollingDateType::class, [
'label' => 'end period date',
'data' => new RollingDate(RollingDate::T_TODAY),
]);
}
public function getFormDefaultData(): array
{
return ['start_date' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'end_date' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -37,6 +37,10 @@ class CurrentEvaluationsFilter implements FilterInterface
{
//no form needed
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -64,6 +64,10 @@ final class EvaluationTypeFilter implements FilterInterface
'expanded' => true,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -61,6 +61,10 @@ class MaxDateFilter implements FilterInterface
'expanded' => true,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -84,9 +84,11 @@ class CompositionFilter implements FilterInterface
'multiple' => true,
'expanded' => true,
])
->add('on_date', PickRollingDateType::class, [
'data' => new RollingDate(RollingDate::T_TODAY),
]);
->add('on_date', PickRollingDateType::class, []);
}
public function getFormDefaultData(): array
{
return ['on_date' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string'): array

View File

@@ -76,17 +76,19 @@ class AddressRefStatusFilter implements \Chill\MainBundle\Export\FilterInterface
->add('date_calc', PickRollingDateType::class, [
'label' => 'Compute address at date',
'required' => true,
'data' => new RollingDate(RollingDate::T_TODAY),
])
->add('ref_statuses', ChoiceType::class, [
'label' => 'export.filter.person.by_address_ref_status.Status',
'choices' => [Address::ADDR_REFERENCE_STATUS_TO_REVIEW, Address::ADDR_REFERENCE_STATUS_REVIEWED, Address::ADDR_REFERENCE_STATUS_MATCH],
'choice_label' => fn (string $item) => 'export.filter.person.by_address_ref_status.'.$item,
'multiple' => true,
'expanded' => true,
'data' => [Address::ADDR_REFERENCE_STATUS_TO_REVIEW]
'expanded' => true
]);
}
public function getFormDefaultData(): array
{
return ['date_calc' => new RollingDate(RollingDate::T_TODAY), 'ref_statuses' => [Address::ADDR_REFERENCE_STATUS_TO_REVIEW]];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -71,14 +71,16 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
{
$builder->add('date_from', PickRollingDateType::class, [
'label' => 'Born after this date',
'data' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START),
]);
$builder->add('date_to', PickRollingDateType::class, [
'label' => 'Born before this date',
'data' => new RollingDate(RollingDate::T_TODAY),
]);
}
public function getFormDefaultData(): array
{
return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -86,9 +86,12 @@ class ByHouseholdCompositionFilter implements FilterInterface
])
->add('calc_date', PickRollingDateType::class, [
'label' => 'export.filter.person.by_composition.Date calc',
'data' => new RollingDate(RollingDate::T_TODAY),
]);
}
public function getFormDefaultData(): array
{
return ['calc_date' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -102,9 +102,12 @@ class DeadOrAliveFilter implements FilterInterface
$builder->add('date_calc', PickRollingDateType::class, [
'label' => 'Filter in relation to this date',
'data' => new RollingDate(RollingDate::T_TODAY),
]);
}
public function getFormDefaultData(): array
{
return ['date_calc' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -72,14 +72,16 @@ class DeathdateFilter implements ExportElementValidatedInterface, FilterInterfac
{
$builder->add('date_from', PickRollingDateType::class, [
'label' => 'Death after this date',
'data' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START),
]);
$builder->add('date_to', PickRollingDateType::class, [
'label' => 'Deathdate before',
'data' => new RollingDate(RollingDate::T_TODAY),
]);
}
public function getFormDefaultData(): array
{
return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -89,6 +89,10 @@ class GenderFilter implements
'expanded' => true,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -91,7 +91,6 @@ class GeographicalUnitFilter implements \Chill\MainBundle\Export\FilterInterface
->add('date_calc', PickRollingDateType::class, [
'label' => 'Compute geographical location at date',
'required' => true,
'data' => new RollingDate(RollingDate::T_TODAY),
])
->add('units', ChoiceType::class, [
'label' => 'Geographical unit',
@@ -105,6 +104,10 @@ class GeographicalUnitFilter implements \Chill\MainBundle\Export\FilterInterface
'multiple' => true,
]);
}
public function getFormDefaultData(): array
{
return ['date_calc' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -56,6 +56,10 @@ class MaritalStatusFilter implements FilterInterface
'expanded' => true,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -67,6 +67,10 @@ class NationalityFilter implements
'placeholder' => 'Choose countries',
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -107,9 +107,12 @@ class ResidentialAddressAtThirdpartyFilter implements FilterInterface
$builder->add('date_calc', PickRollingDateType::class, [
'label' => 'Date during which residential address was valid',
'data' => new RollingDate(RollingDate::T_TODAY),
]);
}
public function getFormDefaultData(): array
{
return ['date_calc' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -82,9 +82,12 @@ class ResidentialAddressAtUserFilter implements FilterInterface
{
$builder->add('date_calc', PickRollingDateType::class, [
'label' => 'Date during which residential address was valid',
'data' => new RollingDate(RollingDate::T_TODAY),
]);
}
public function getFormDefaultData(): array
{
return ['date_calc' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -66,9 +66,12 @@ class WithoutHouseholdComposition implements FilterInterface
$builder
->add('calc_date', PickRollingDateType::class, [
'label' => 'export.filter.person.by_no_composition.Date calc',
'data' => new RollingDate(RollingDate::T_TODAY),
]);
}
public function getFormDefaultData(): array
{
return ['calc_date' => new RollingDate(RollingDate::T_TODAY)];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -32,17 +32,18 @@ final readonly class AccompanyingPeriodWorkEndDateBetweenDateFilter implements F
$builder
->add('start_date', PickRollingDateType::class, [
'label' => 'export.filter.work.end_between_dates.start_date',
'data' => new RollingDate(RollingDate::T_TODAY),
])
->add('end_date', PickRollingDateType::class, [
'label' => 'export.filter.work.end_between_dates.end_date',
'data' => new RollingDate(RollingDate::T_TODAY),
])
->add('keep_null', CheckboxType::class, [
'label' => 'export.filter.work.end_between_dates.keep_null',
'help' => 'export.filter.work.end_between_dates.keep_null_help',
])
;
]);
}
public function getFormDefaultData(): array
{
return ['start_date' => new RollingDate(RollingDate::T_TODAY), 'end_date' => new RollingDate(RollingDate::T_TODAY)];
}
public function getTitle(): string

View File

@@ -32,17 +32,18 @@ final readonly class AccompanyingPeriodWorkStartDateBetweenDateFilter implements
$builder
->add('start_date', PickRollingDateType::class, [
'label' => 'export.filter.work.start_between_dates.start_date',
'data' => new RollingDate(RollingDate::T_TODAY),
])
->add('end_date', PickRollingDateType::class, [
'label' => 'export.filter.work.start_between_dates.end_date',
'data' => new RollingDate(RollingDate::T_TODAY),
])
->add('keep_null', CheckboxType::class, [
'label' => 'export.filter.work.start_between_dates.keep_null',
'help' => 'export.filter.work.start_between_dates.keep_null_help',
])
;
]);
}
public function getFormDefaultData(): array
{
return ['start_date' => new RollingDate(RollingDate::T_TODAY), 'end_date' => new RollingDate(RollingDate::T_TODAY)];
}
public function getTitle(): string

View File

@@ -37,6 +37,10 @@ class CurrentActionFilter implements FilterInterface
{
//no form
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

View File

@@ -76,6 +76,10 @@ class JobFilter implements FilterInterface
'expanded' => true,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string')
{

View File

@@ -57,6 +57,10 @@ class ReferrerFilter implements FilterInterface
'multiple' => true,
]);
}
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array
{

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