mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix missing choices in getFormDefaultData with automatic generation
This commit is contained in:
parent
7fab411b96
commit
cf576dca7b
@ -86,6 +86,11 @@ class CSVFormatter implements FormatterInterface
|
||||
}
|
||||
}
|
||||
|
||||
public function getFormDefaultData(array $aggregatorAliases): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
public function gatherFiltersDescriptions()
|
||||
{
|
||||
$descriptions = [];
|
||||
|
@ -118,6 +118,14 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface, Grou
|
||||
}
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
$choices = array_combine(ListPersonHelper::FIELDS, ListPersonHelper::FIELDS);
|
||||
|
||||
foreach ($this->getCustomFields() as $cf) {
|
||||
$choices[$this->translatableStringHelper->localize($cf->getName())]
|
||||
=
|
||||
$cf->getSlug();
|
||||
}
|
||||
|
||||
return ['fields' => array_values($choices), 'address_date' => new DateTimeImmutable()];
|
||||
}
|
||||
|
||||
|
@ -91,6 +91,8 @@ class ListPersonWithAccompanyingPeriod implements ExportElementValidatedInterfac
|
||||
}
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
$choices = array_combine(ListPersonHelper::FIELDS, ListPersonHelper::FIELDS);
|
||||
|
||||
return ['fields' => array_values($choices), 'address_date' => new DateTimeImmutable()];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user