reinstate exports

This commit is contained in:
Julie Lenaerts 2024-05-07 11:14:39 +02:00
parent 526882a5b6
commit 684f28291a
5 changed files with 8 additions and 16 deletions

View File

@ -284,7 +284,7 @@ class ListCSPerson extends ListPerson implements ListInterface, ExportElementVal
'choices' => $choices,
'data' => $choices,
// les checkbox cochés !!
'choices_as_values' => true,
// 'choices_as_values' => true,
'label' => 'Fields to include in export',
'choice_label' => fn ($key) => str_replace('__', '.', (string) $key),
'choice_attr' => function ($val) {

View File

@ -92,7 +92,7 @@ class ListCV implements ListInterface, ExportElementValidatedInterface
->add('fields', ChoiceType::class, [
'multiple' => true,
'expanded' => true,
'choices_as_values' => true,
// 'choices_as_values' => true,
'label' => 'Fields to include in export',
'choices' => array_combine($this->getFields(), $this->getFields()),
'data' => array_combine($this->getFields(), $this->getFields()),

View File

@ -105,7 +105,7 @@ class ListFrein implements ListInterface, ExportElementValidatedInterface
->add('fields', ChoiceType::class, [
'multiple' => true,
'expanded' => true,
'choices_as_values' => true,
// 'choices_as_values' => true,
'label' => 'Fields to include in export',
'choices' => array_combine($this->getFields(), $this->getFields()),
'data' => array_combine($this->getFields(), $this->getFields()),
@ -187,7 +187,7 @@ class ListFrein implements ListInterface, ExportElementValidatedInterface
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{
return $this->entityManager->createQueryBuilder()
->from('ChillPersonBundle:Person', 'person');
->from(Person::class, 'person');
}
/**

View File

@ -110,7 +110,7 @@ class ListProjetProfessionnel implements ListInterface, ExportElementValidatedIn
->add('fields', ChoiceType::class, [
'multiple' => true,
'expanded' => true,
'choices_as_values' => true,
// 'choices_as_values' => true,
'label' => 'Fields to include in export',
'choice_label' => fn ($key) => str_replace('__', '.', (string) $key),
'choices' => array_combine($this->getFields(), $this->getFields()),

View File

@ -1,28 +1,20 @@
services:
_defaults:
autowire: true
autoconfigure: true
Chill\JobBundle\Export\ListCSPerson:
arguments:
$em: '@doctrine.orm.entity_manager'
$translator: "@translator"
$translatableStringHelper: "@chill.main.helper.translatable_string"
$customFieldProvider: "@chill.custom_field.provider"
tags:
- { name: chill.export, alias: list_CSPerson }
Chill\JobBundle\Export\ListCV:
arguments:
$em: '@doctrine.orm.entity_manager'
tags:
- { name: chill.export, alias: list_CV }
Chill\JobBundle\Export\ListFrein:
arguments:
$em: '@doctrine.orm.entity_manager'
tags:
- { name: chill.export, alias: list_Frein }
Chill\JobBundle\Export\ListProjetProfessionnel:
arguments:
$em: '@doctrine.orm.entity_manager'
tags:
- { name: chill.export, alias: list_ProjetProfessionnel }