mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
add person exports in a group
This commit is contained in:
@@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Export\Export;
|
||||
|
||||
use Chill\MainBundle\Export\ExportInterface;
|
||||
use Chill\MainBundle\Export\FormatterInterface;
|
||||
use Chill\MainBundle\Export\GroupedExportInterface;
|
||||
use Chill\PersonBundle\Export\Declarations;
|
||||
use Chill\PersonBundle\Security\Authorization\PersonVoter;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
@@ -22,7 +23,7 @@ use LogicException;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
|
||||
class CountPerson implements ExportInterface
|
||||
class CountPerson implements ExportInterface, GroupedExportInterface
|
||||
{
|
||||
/**
|
||||
* @var EntityManagerInterface
|
||||
@@ -114,4 +115,9 @@ class CountPerson implements ExportInterface
|
||||
{
|
||||
return [Declarations::PERSON_TYPE, Declarations::PERSON_IMPLIED_IN];
|
||||
}
|
||||
|
||||
public function getGroup(): string
|
||||
{
|
||||
return 'Exports of persons';
|
||||
}
|
||||
}
|
||||
|
@@ -16,6 +16,7 @@ use Chill\CustomFieldsBundle\Entity\CustomField;
|
||||
use Chill\CustomFieldsBundle\Service\CustomFieldProvider;
|
||||
use Chill\MainBundle\Export\ExportElementValidatedInterface;
|
||||
use Chill\MainBundle\Export\FormatterInterface;
|
||||
use Chill\MainBundle\Export\GroupedExportInterface;
|
||||
use Chill\MainBundle\Export\ListInterface;
|
||||
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
@@ -45,7 +46,7 @@ use function uniqid;
|
||||
/**
|
||||
* Render a list of people.
|
||||
*/
|
||||
class ListPerson implements ExportElementValidatedInterface, ListInterface
|
||||
class ListPerson implements ExportElementValidatedInterface, ListInterface, GroupedExportInterface
|
||||
{
|
||||
protected CustomFieldProvider $customFieldProvider;
|
||||
|
||||
@@ -474,4 +475,9 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface
|
||||
|
||||
return $uid;
|
||||
}
|
||||
|
||||
public function getGroup(): string
|
||||
{
|
||||
return 'Exports of persons';
|
||||
}
|
||||
}
|
||||
|
@@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Export\Export;
|
||||
|
||||
use Chill\MainBundle\Export\DirectExportInterface;
|
||||
use Chill\MainBundle\Export\ExportElementValidatedInterface;
|
||||
use Chill\MainBundle\Export\GroupedExportInterface;
|
||||
use Chill\PersonBundle\Security\Authorization\PersonVoter;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
||||
@@ -30,7 +31,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
/**
|
||||
* Render a list of duplicate peoples.
|
||||
*/
|
||||
class ListPersonDuplicate implements DirectExportInterface, ExportElementValidatedInterface
|
||||
class ListPersonDuplicate implements DirectExportInterface, ExportElementValidatedInterface, GroupedExportInterface
|
||||
{
|
||||
/**
|
||||
* @var float
|
||||
@@ -196,4 +197,9 @@ class ListPersonDuplicate implements DirectExportInterface, ExportElementValidat
|
||||
|
||||
return $result->fetchAllAssociative();
|
||||
}
|
||||
|
||||
public function getGroup(): string
|
||||
{
|
||||
return 'Exports of persons';
|
||||
}
|
||||
}
|
||||
|
@@ -326,6 +326,7 @@ Pediod closing form is not valide: Le formulaire de fermeture n'est pas valide
|
||||
Accompanyied people: Personnes accompagnées
|
||||
|
||||
## exports
|
||||
Exports of persons: Exports des personnes
|
||||
Count peoples by various parameters.: Compte le nombre de personnes en fonction de différents filtres.
|
||||
Count peoples: Nombre de personnes
|
||||
List peoples: Liste des personnes
|
||||
|
Reference in New Issue
Block a user