apply rector rules for exports

This commit is contained in:
Julien Fastré 2023-06-05 17:21:21 +02:00
parent ea77adc640
commit 3adf3625dc
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
168 changed files with 675 additions and 47 deletions

View File

@ -62,7 +62,6 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
{ {
$builder->add('date_from', DateType::class, [ $builder->add('date_from', DateType::class, [
'label' => 'Born after this date', 'label' => 'Born after this date',
'data' => new DateTime(),
'attr' => ['class' => 'datepicker'], 'attr' => ['class' => 'datepicker'],
'widget' => 'single_text', 'widget' => 'single_text',
'format' => 'dd-MM-yyyy', 'format' => 'dd-MM-yyyy',
@ -70,12 +69,15 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
$builder->add('date_to', DateType::class, [ $builder->add('date_to', DateType::class, [
'label' => 'Born before this date', 'label' => 'Born before this date',
'data' => new DateTime(),
'attr' => ['class' => 'datepicker'], 'attr' => ['class' => 'datepicker'],
'widget' => 'single_text', 'widget' => 'single_text',
'format' => 'dd-MM-yyyy', 'format' => 'dd-MM-yyyy',
]); ]);
} }
public function getFormDefaultData(): array
{
return ['date_from' => new DateTime(), 'date_to' => new DateTime()];
}
// here, we create a simple string which will describe the action of // here, we create a simple string which will describe the action of
// the filter in the Response // the filter in the Response

View File

@ -36,6 +36,10 @@ class CountPerson implements ExportInterface
{ {
// this export does not add any form // this export does not add any form
} }
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes() public function getAllowedFormattersTypes()
{ {

View File

@ -24,6 +24,9 @@ return static function (RectorConfig $rectorConfig): void {
LevelSetList::UP_TO_PHP_74 LevelSetList::UP_TO_PHP_74
]); ]);
// chill rules
$rectorConfig->rule(\Utils\Rector\Rector\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector::class);
// skip some path... // skip some path...
$rectorConfig->skip([ $rectorConfig->skip([
// make rector stuck for some files // make rector stuck for some files

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -84,9 +84,12 @@ class DateAggregator implements AggregatorInterface
'multiple' => false, 'multiple' => false,
'expanded' => true, 'expanded' => true,
'empty_data' => self::DEFAULT_CHOICE, '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) public function getLabels($key, array $values, $data)
{ {

View File

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

View File

@ -60,6 +60,10 @@ class ActivityTypeAggregator implements AggregatorInterface
{ {
// no form required for this aggregator // no form required for this aggregator
} }
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data): Closure public function getLabels($key, array $values, $data): Closure
{ {

View File

@ -58,6 +58,10 @@ class ActivityUserAggregator implements AggregatorInterface
{ {
// nothing to add // nothing to add
} }
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, $values, $data): Closure public function getLabels($key, $values, $data): Closure
{ {

View File

@ -56,6 +56,10 @@ class ActivityUsersAggregator implements AggregatorInterface
{ {
// nothing to add on the form // nothing to add on the form
} }
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data) public function getLabels($key, array $values, $data)
{ {

View File

@ -55,6 +55,10 @@ class ActivityUsersJobAggregator implements \Chill\MainBundle\Export\AggregatorI
{ {
// nothing to add in the form // nothing to add in the form
} }
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data) public function getLabels($key, array $values, $data)
{ {

View File

@ -55,6 +55,10 @@ class ActivityUsersScopeAggregator implements \Chill\MainBundle\Export\Aggregato
{ {
// nothing to add in the form // nothing to add in the form
} }
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data) public function getLabels($key, array $values, $data)
{ {

View File

@ -110,6 +110,10 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
] ]
); );
} }
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data) public function getLabels($key, array $values, $data)
{ {

View File

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

View File

@ -39,6 +39,10 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface
public function buildForm(FormBuilderInterface $builder) public function buildForm(FormBuilderInterface $builder)
{ {
} }
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes(): array public function getAllowedFormattersTypes(): array
{ {

View File

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

View File

@ -39,6 +39,10 @@ class CountActivity implements ExportInterface, GroupedExportInterface
public function buildForm(FormBuilderInterface $builder) public function buildForm(FormBuilderInterface $builder)
{ {
} }
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes(): array public function getAllowedFormattersTypes(): array
{ {

View File

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

View File

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

View File

@ -35,6 +35,10 @@ class CountActivity implements ExportInterface, GroupedExportInterface
public function buildForm(FormBuilderInterface $builder) public function buildForm(FormBuilderInterface $builder)
{ {
} }
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes() public function getAllowedFormattersTypes()
{ {

View File

@ -53,6 +53,10 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface
public function buildForm(FormBuilderInterface $builder) public function buildForm(FormBuilderInterface $builder)
{ {
} }
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes() public function getAllowedFormattersTypes()
{ {

View File

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

View File

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

View File

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

View File

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

View File

@ -68,9 +68,12 @@ class EmergencyFilter implements FilterInterface
'multiple' => false, 'multiple' => false,
'expanded' => true, 'expanded' => true,
'empty_data' => self::DEFAULT_CHOICE, '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 public function describeAction($data, $format = 'string'): array
{ {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -78,6 +78,10 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter
], ],
]); ]);
} }
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string') public function describeAction($data, $format = 'string')
{ {

View File

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

View File

@ -82,6 +82,10 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt
'expanded' => false, 'expanded' => false,
]); ]);
} }
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string') public function describeAction($data, $format = 'string')
{ {

View File

@ -112,7 +112,6 @@ class PersonHavingActivityBetweenDateFilter implements ExportElementValidatedInt
{ {
$builder->add('date_from', DateType::class, [ $builder->add('date_from', DateType::class, [
'label' => 'Implied in an activity after this date', 'label' => 'Implied in an activity after this date',
'data' => new DateTime(),
'attr' => ['class' => 'datepicker'], 'attr' => ['class' => 'datepicker'],
'widget' => 'single_text', 'widget' => 'single_text',
'format' => 'dd-MM-yyyy', 'format' => 'dd-MM-yyyy',
@ -120,7 +119,6 @@ class PersonHavingActivityBetweenDateFilter implements ExportElementValidatedInt
$builder->add('date_to', DateType::class, [ $builder->add('date_to', DateType::class, [
'label' => 'Implied in an activity before this date', 'label' => 'Implied in an activity before this date',
'data' => new DateTime(),
'attr' => ['class' => 'datepicker'], 'attr' => ['class' => 'datepicker'],
'widget' => 'single_text', 'widget' => 'single_text',
'format' => 'dd-MM-yyyy', 'format' => 'dd-MM-yyyy',
@ -130,7 +128,6 @@ class PersonHavingActivityBetweenDateFilter implements ExportElementValidatedInt
'class' => ActivityReason::class, 'class' => ActivityReason::class,
'choice_label' => fn (ActivityReason $reason): ?string => $this->translatableStringHelper->localize($reason->getName()), 'choice_label' => fn (ActivityReason $reason): ?string => $this->translatableStringHelper->localize($reason->getName()),
'group_by' => fn (ActivityReason $reason): ?string => $this->translatableStringHelper->localize($reason->getCategory()->getName()), 'group_by' => fn (ActivityReason $reason): ?string => $this->translatableStringHelper->localize($reason->getCategory()->getName()),
'data' => $this->activityReasonRepository->findAll(),
'multiple' => true, 'multiple' => true,
'expanded' => false, 'expanded' => false,
'label' => 'Activity reasons for those activities', 'label' => 'Activity reasons for those activities',
@ -176,6 +173,10 @@ class PersonHavingActivityBetweenDateFilter implements ExportElementValidatedInt
} }
}); });
} }
public function getFormDefaultData(): array
{
return ['date_from' => new DateTime(), 'date_to' => new DateTime(), 'reasons' => $this->activityReasonRepository->findAll()];
}
public function describeAction($data, $format = 'string') public function describeAction($data, $format = 'string')
{ {

View File

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

View File

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

View File

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

View File

@ -57,6 +57,10 @@ class ByUserJobAggregator implements AggregatorInterface
{ {
// nothing to add in the form // nothing to add in the form
} }
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data) public function getLabels($key, array $values, $data)
{ {

View File

@ -57,6 +57,10 @@ class ByUserScopeAggregator implements AggregatorInterface
{ {
// nothing to add in the form // nothing to add in the form
} }
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data) public function getLabels($key, array $values, $data)
{ {

View File

@ -34,6 +34,10 @@ class AvgAsideActivityDuration implements ExportInterface, GroupedExportInterfac
public function buildForm(FormBuilderInterface $builder) public function buildForm(FormBuilderInterface $builder)
{ {
} }
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes(): array public function getAllowedFormattersTypes(): array
{ {

View File

@ -34,6 +34,10 @@ class CountAsideActivity implements ExportInterface, GroupedExportInterface
public function buildForm(FormBuilderInterface $builder) public function buildForm(FormBuilderInterface $builder)
{ {
} }
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes(): array public function getAllowedFormattersTypes(): array
{ {

View File

@ -34,6 +34,10 @@ class SumAsideActivityDuration implements ExportInterface, GroupedExportInterfac
public function buildForm(FormBuilderInterface $builder) public function buildForm(FormBuilderInterface $builder)
{ {
} }
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes(): array public function getAllowedFormattersTypes(): array
{ {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -36,6 +36,10 @@ class CountCalendars implements ExportInterface, GroupedExportInterface
{ {
// No form necessary // No form necessary
} }
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes(): array public function getAllowedFormattersTypes(): array
{ {

View File

@ -36,6 +36,10 @@ class StatCalendarAvgDuration implements ExportInterface, GroupedExportInterface
{ {
// no form needed // no form needed
} }
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes(): array public function getAllowedFormattersTypes(): array
{ {

View File

@ -36,6 +36,10 @@ class StatCalendarSumDuration implements ExportInterface, GroupedExportInterface
{ {
// no form needed // no form needed
} }
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes(): array public function getAllowedFormattersTypes(): array
{ {

View File

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

View File

@ -67,6 +67,10 @@ class BetweenDatesFilter implements FilterInterface
'data' => new RollingDate(RollingDate::T_TODAY), 'data' => new RollingDate(RollingDate::T_TODAY),
]); ]);
} }
public function getFormDefaultData(): array
{
return [];
}
public function describeAction($data, $format = 'string'): array public function describeAction($data, $format = 'string'): array
{ {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -75,9 +75,12 @@ class ByEndDateAggregator implements AggregatorInterface
'multiple' => false, 'multiple' => false,
'expanded' => true, 'expanded' => true,
'empty_data' => self::DEFAULT_CHOICE, '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) public function getLabels($key, array $values, $data)
{ {

View File

@ -75,9 +75,12 @@ class ByMaxDateAggregator implements AggregatorInterface
'multiple' => false, 'multiple' => false,
'expanded' => true, 'expanded' => true,
'empty_data' => self::DEFAULT_CHOICE, '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) public function getLabels($key, array $values, $data)
{ {

View File

@ -75,9 +75,12 @@ class ByStartDateAggregator implements AggregatorInterface
'multiple' => false, 'multiple' => false,
'expanded' => true, 'expanded' => true,
'empty_data' => self::DEFAULT_CHOICE, '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) public function getLabels($key, array $values, $data)
{ {

View File

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

View File

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

View File

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

View File

@ -77,9 +77,11 @@ class CompositionAggregator implements AggregatorInterface
public function buildForm(FormBuilderInterface $builder) public function buildForm(FormBuilderInterface $builder)
{ {
$builder->add('on_date', PickRollingDateType::class, [ $builder->add('on_date', PickRollingDateType::class, []);
'data' => new RollingDate(RollingDate::T_TODAY), }
]); public function getFormDefaultData(): array
{
return ['on_date' => new RollingDate(RollingDate::T_TODAY)];
} }
public function getLabels($key, array $values, $data) 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, [ $builder->add('date_age_calculation', DateType::class, [
'label' => 'Calculate age in relation to this date', 'label' => 'Calculate age in relation to this date',
'data' => new DateTime(),
'attr' => ['class' => 'datepicker'], 'attr' => ['class' => 'datepicker'],
'widget' => 'single_text', 'widget' => 'single_text',
'format' => 'dd-MM-yyyy', 'format' => 'dd-MM-yyyy',
]); ]);
} }
public function getFormDefaultData(): array
{
return ['date_age_calculation' => new DateTime()];
}
public function getLabels($key, array $values, $data) public function getLabels($key, array $values, $data)
{ {

View File

@ -94,9 +94,12 @@ class ByHouseholdCompositionAggregator implements AggregatorInterface
{ {
$builder->add('date_calc', PickRollingDateType::class, [ $builder->add('date_calc', PickRollingDateType::class, [
'label' => 'export.aggregator.person.by_household_composition.Calc date', '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) public function getLabels($key, array $values, $data)
{ {

View File

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

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