exports: use Declarations for each applyOn

This commit is contained in:
Mathieu Jaumotte 2022-08-04 14:12:25 +02:00
parent 2f8bafa2e2
commit 95006b9643
6 changed files with 12 additions and 6 deletions

View File

@ -14,6 +14,7 @@ namespace Chill\PersonBundle\Export\Filter\PersonFilters;
use Chill\MainBundle\Export\FilterInterface;
use Chill\MainBundle\Form\Type\ChillDateType;
use Chill\PersonBundle\Export\AbstractAccompanyingPeriodExportElement;
use Chill\PersonBundle\Export\Declarations;
use DateTime;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\QueryBuilder;
@ -42,7 +43,7 @@ class AccompanyingPeriodClosingFilter extends AbstractAccompanyingPeriodExportEl
public function applyOn(): string
{
return 'person';
return Declarations::PERSON_TYPE;
}
public function buildForm(FormBuilderInterface $builder)

View File

@ -14,6 +14,7 @@ namespace Chill\PersonBundle\Export\Filter\PersonFilters;
use Chill\MainBundle\Export\FilterInterface;
use Chill\MainBundle\Form\Type\ChillDateType;
use Chill\PersonBundle\Export\AbstractAccompanyingPeriodExportElement;
use Chill\PersonBundle\Export\Declarations;
use DateTime;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\QueryBuilder;
@ -49,7 +50,7 @@ class AccompanyingPeriodFilter extends AbstractAccompanyingPeriodExportElement i
public function applyOn(): string
{
return 'person';
return Declarations::PERSON_TYPE;
}
public function buildForm(FormBuilderInterface $builder)

View File

@ -14,6 +14,7 @@ namespace Chill\PersonBundle\Export\Filter\PersonFilters;
use Chill\MainBundle\Export\FilterInterface;
use Chill\MainBundle\Form\Type\ChillDateType;
use Chill\PersonBundle\Export\AbstractAccompanyingPeriodExportElement;
use Chill\PersonBundle\Export\Declarations;
use DateTime;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\QueryBuilder;
@ -42,7 +43,7 @@ class AccompanyingPeriodOpeningFilter extends AbstractAccompanyingPeriodExportEl
public function applyOn(): string
{
return 'person';
return Declarations::PERSON_TYPE;
}
public function buildForm(FormBuilderInterface $builder)

View File

@ -14,6 +14,7 @@ namespace Chill\PersonBundle\Export\Filter\PersonFilters;
use Chill\MainBundle\Export\ExportElementValidatedInterface;
use Chill\MainBundle\Export\FilterInterface;
use Chill\MainBundle\Form\Type\ChillDateType;
use Chill\PersonBundle\Export\Declarations;
use DateTime;
use Doctrine\ORM\Query\Expr;
use Symfony\Component\Form\Extension\Core\Type\DateType;
@ -48,7 +49,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
public function applyOn()
{
return 'person';
return Declarations::PERSON_TYPE;
}
public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder)

View File

@ -14,6 +14,7 @@ namespace Chill\PersonBundle\Export\Filter\PersonFilters;
use Chill\MainBundle\Export\ExportElementValidatedInterface;
use Chill\MainBundle\Export\FilterInterface;
use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Export\Declarations;
use Doctrine\ORM\Query\Expr;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
@ -74,7 +75,7 @@ class GenderFilter implements
public function applyOn()
{
return 'person';
return Declarations::PERSON_TYPE;
}
public function buildForm(FormBuilderInterface $builder)

View File

@ -16,6 +16,7 @@ use Chill\MainBundle\Export\ExportElementValidatedInterface;
use Chill\MainBundle\Export\FilterInterface;
use Chill\MainBundle\Form\Type\Select2CountryType;
use Chill\MainBundle\Templating\TranslatableStringHelper;
use Chill\PersonBundle\Export\Declarations;
use Doctrine\ORM\Query\Expr;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
@ -57,7 +58,7 @@ class NationalityFilter implements
public function applyOn()
{
return 'person';
return Declarations::PERSON_TYPE;
}
public function buildForm(FormBuilderInterface $builder)