[WIP] get default data from saved exports for center and export steps

This commit is contained in:
2023-06-02 15:32:38 +02:00
parent d1e1b1c4ce
commit fb0afc7e0a
9 changed files with 225 additions and 97 deletions

View File

@@ -48,6 +48,7 @@ final class MaritalStatusAggregator implements AggregatorInterface
public function applyOn()
{
return 'abcde';
return Declarations::PERSON_TYPE;
}
@@ -56,6 +57,11 @@ final class MaritalStatusAggregator implements AggregatorInterface
// no form
}
public function getFormDefaultData(): array
{
return [];
}
public function getLabels($key, array $values, $data)
{
return function ($value): string {

View File

@@ -38,6 +38,11 @@ class CountPerson implements ExportInterface, GroupedExportInterface
// No form necessary
}
public function getFormDefaultData(): array
{
return [];
}
public function getAllowedFormattersTypes()
{
return [FormatterInterface::TYPE_TABULAR];
@@ -115,9 +120,9 @@ class CountPerson implements ExportInterface, GroupedExportInterface
public function supportsModifiers()
{
return [
Declarations::PERSON_TYPE,
Declarations::PERSON_IMPLIED_IN,
//Declarations::ACP_TYPE
'abcde',
//Declarations::PERSON_TYPE,
//Declarations::PERSON_IMPLIED_IN,
];
}
}

View File

@@ -73,6 +73,7 @@ class AgeFilter implements ExportElementValidatedInterface, FilterInterface
public function applyOn()
{
return 'abcde';
return Declarations::PERSON_TYPE;
}
@@ -92,6 +93,15 @@ class AgeFilter implements ExportElementValidatedInterface, FilterInterface
]);
}
public function getFormDefaultData(): array
{
return [
'min_age' => 0,
'max_age' => 120,
'date_calc' => new RollingDate(RollingDate::T_TODAY),
];
}
public function describeAction($data, $format = 'string')
{
return ['Filtered by person\'s age: '