Commit e4dfcb8d by Damien Moulard

export data script: small fixes

parent 0667e5b0
......@@ -11,6 +11,7 @@ use Symfony\Component\Console\Output\OutputInterface;
use App\Entity\Adherent;
use App\Entity\Prestataire;
use App\Entity\Flux;
use App\Entity\Comptoir;
class ExportAndUploadDataCommand extends Command
{
......@@ -50,6 +51,7 @@ class ExportAndUploadDataCommand extends Command
$data = [
"adherents" => [],
"prestataires" => [],
"comptoirs" => [],
"flux" => [],
];
......@@ -88,6 +90,7 @@ class ExportAndUploadDataCommand extends Command
$prestataires = $this->em->getRepository(Prestataire::class)->findAllForSsaExport();
foreach ($prestataires as $p) {
$presta = [
"id" => $p->getId(),
"raison" => $p->getRaison(),
"addresses" => [],
"rubrics" => [],
......@@ -111,6 +114,14 @@ class ExportAndUploadDataCommand extends Command
$data["prestataires"][] = $presta;
}
$comptoirs = $this->em->getRepository(Comptoir::class)->findAll();
foreach ($comptoirs as $c) {
$data["comptoirs"][] = [
"id" => $c->getId(),
"name" => $c->getName(),
];
}
$flux = $this->em->getRepository(Flux::class)->findAll();
foreach ($flux as $f) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment