fix(manager): add doctrine fixtures
This commit is contained in:
@ -72,7 +72,7 @@ class UserController extends AbstractController
|
||||
->from("App\Entity\UserModo", 'usermodo')
|
||||
->where('usermodo.niveau01 = entity.niveau01')
|
||||
->andWhere('usermodo.user = :user')
|
||||
->where('entity.isactive = :isactive')
|
||||
->andwhere('entity.isactive = :isactive')
|
||||
->setParameter('isactive', $isactive)
|
||||
->setParameter('user', $this->getUser())
|
||||
->getQuery()->getSingleScalarResult();
|
||||
@ -89,7 +89,7 @@ class UserController extends AbstractController
|
||||
->select('COUNT(entity)')
|
||||
->from($this->entity, 'entity')
|
||||
->where('entity.isvisible=true')
|
||||
->where('entity.isactive = :isactive')
|
||||
->andwhere('entity.isactive = :isactive')
|
||||
->setParameter('isactive', $isactive);
|
||||
|
||||
switch ($request->getSession()->get('scopeannu')) {
|
||||
|
334
src/DataFixtures/AppFixtures.php
Normal file
334
src/DataFixtures/AppFixtures.php
Normal file
@ -0,0 +1,334 @@
|
||||
<?php
|
||||
|
||||
namespace App\DataFixtures;
|
||||
|
||||
use Doctrine\Bundle\FixturesBundle\Fixture;
|
||||
use Doctrine\Persistence\ObjectManager;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Component\HttpKernel\KernelInterface;
|
||||
use Symfony\Component\Console\Input\ArrayInput;
|
||||
use Symfony\Component\Console\Output\BufferedOutput;
|
||||
use Symfony\Component\Console\Output\ConsoleOutput;
|
||||
use Doctrine\ORM\Id\AssignedGenerator;
|
||||
use Doctrine\ORM\Mapping\ClassMetadata;
|
||||
|
||||
use App\Entity\Niveau01;
|
||||
use App\Entity\Niveau02;
|
||||
use App\Entity\Niveau03;
|
||||
use App\Entity\Niveau04;
|
||||
use App\Entity\User;
|
||||
use App\Entity\UserModo;
|
||||
|
||||
class AppFixtures extends Fixture
|
||||
{
|
||||
private $kernel;
|
||||
private $output;
|
||||
|
||||
public function __construct(KernelInterface $kernel)
|
||||
{
|
||||
$this->kernel = $kernel;
|
||||
$this->output = new ConsoleOutput();
|
||||
}
|
||||
|
||||
public function load(ObjectManager $manager): void
|
||||
{
|
||||
// app:Init
|
||||
$this->writeln("app:Init");
|
||||
$application = new Application($this->kernel);
|
||||
$application->setAutoExit(false);
|
||||
$input = new ArrayInput(['command' => 'app:Init']);
|
||||
$boutput = new BufferedOutput();
|
||||
$application->run($input, $boutput);
|
||||
$manager->flush();
|
||||
|
||||
// app:Synchro
|
||||
$manager->clear();
|
||||
$this->writeln("app:Synchro");
|
||||
$input = new ArrayInput(['command' => 'app:Synchro']);
|
||||
$boutput = new BufferedOutput();
|
||||
$application->run($input, $boutput);
|
||||
|
||||
// Assign id
|
||||
$metadata = $manager->getClassMetaData('App\Entity\Niveau01');
|
||||
$metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE);
|
||||
$metadata->setIdGenerator(new AssignedGenerator());
|
||||
|
||||
$metadata = $manager->getClassMetaData('App\Entity\Niveau02');
|
||||
$metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE);
|
||||
$metadata->setIdGenerator(new AssignedGenerator());
|
||||
|
||||
$metadata = $manager->getClassMetaData('App\Entity\Niveau03');
|
||||
$metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE);
|
||||
$metadata->setIdGenerator(new AssignedGenerator());
|
||||
|
||||
$metadata = $manager->getClassMetaData('App\Entity\Niveau04');
|
||||
$metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE);
|
||||
$metadata->setIdGenerator(new AssignedGenerator());
|
||||
|
||||
// Niveau 01
|
||||
$this->writeln("Niveau01");
|
||||
$csv = file_get_contents($this->kernel->getProjectDir().'/src/DataFixtures/niveau01.csv');
|
||||
$tab = $this->csv_to_array($csv);
|
||||
foreach($tab as $lig) {
|
||||
$niveau01=$manager->getRepository('App\Entity\Niveau01')->find($lig['id']);
|
||||
if(!$niveau01) {
|
||||
$niveau01=new Niveau01();
|
||||
$niveau01->setId($lig["id"]);
|
||||
$manager->persist($niveau01);
|
||||
|
||||
}
|
||||
$niveau01->setLabel($lig["label"]);
|
||||
$niveau01->setCode($lig["code"]);
|
||||
$niveau01->setPostaladress($lig["postaladress"]);
|
||||
$niveau01->setTelephonenumber($lig["telephonenumber"]);
|
||||
$niveau01->setEmail($lig["email"]);
|
||||
$niveau01->setApikey($lig["apikey"]);
|
||||
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
// Niveau 02
|
||||
$this->writeln("Niveau02");
|
||||
$csv = file_get_contents($this->kernel->getProjectDir().'/src/DataFixtures/niveau02.csv');
|
||||
$tab = $this->csv_to_array($csv);
|
||||
foreach($tab as $lig) {
|
||||
$niveau01=$manager->getRepository('App\Entity\Niveau01')->findOneBy(["code"=>$lig['codenv1']]);
|
||||
if(!$niveau01) continue;
|
||||
|
||||
$niveau02=$manager->getRepository('App\Entity\Niveau02')->find($lig['id']);
|
||||
if(!$niveau02) {
|
||||
$niveau02=new Niveau02();
|
||||
$niveau02->setId($lig["id"]);
|
||||
$manager->persist($niveau02);
|
||||
|
||||
}
|
||||
$niveau02->setLabel($lig["label"]);
|
||||
$niveau02->setCode($lig["code"]);
|
||||
$niveau02->setPostaladress($lig["postaladress"]);
|
||||
$niveau02->setTelephonenumber($lig["telephonenumber"]);
|
||||
$niveau02->setEmail($lig["email"]);
|
||||
$niveau02->setApikey($lig["apikey"]);
|
||||
$niveau02->setNiveau01($niveau01);
|
||||
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
// Niveau 03
|
||||
$this->writeln("Niveau03");
|
||||
$csv = file_get_contents($this->kernel->getProjectDir().'/src/DataFixtures/niveau03.csv');
|
||||
$tab = $this->csv_to_array($csv);
|
||||
foreach($tab as $lig) {
|
||||
$niveau02=$manager->getRepository('App\Entity\Niveau02')->findOneBy(["code"=>$lig['codenv2']]);
|
||||
if(!$niveau02) continue;
|
||||
|
||||
$niveau03=$manager->getRepository('App\Entity\Niveau03')->find($lig['id']);
|
||||
if(!$niveau03) {
|
||||
$niveau03=new Niveau03();
|
||||
$niveau03->setId($lig["id"]);
|
||||
$manager->persist($niveau03);
|
||||
|
||||
}
|
||||
$niveau03->setLabel($lig["label"]);
|
||||
$niveau03->setCode($lig["code"]);
|
||||
$niveau03->setPostaladress($lig["postaladress"]);
|
||||
$niveau03->setTelephonenumber($lig["telephonenumber"]);
|
||||
$niveau03->setEmail($lig["email"]);
|
||||
$niveau03->setApikey($lig["apikey"]);
|
||||
$niveau03->setNiveau02($niveau02);
|
||||
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
// Niveau 04
|
||||
$this->writeln("Niveau04");
|
||||
$csv = file_get_contents($this->kernel->getProjectDir().'/src/DataFixtures/niveau04.csv');
|
||||
$tab = $this->csv_to_array($csv);
|
||||
foreach($tab as $lig) {
|
||||
$niveau03=$manager->getRepository('App\Entity\Niveau03')->findOneBy(["code"=>$lig['codenv3']]);
|
||||
if(!$niveau03) continue;
|
||||
|
||||
$niveau04=$manager->getRepository('App\Entity\Niveau04')->find($lig['id']);
|
||||
if(!$niveau04) {
|
||||
$niveau04=new Niveau04();
|
||||
$niveau04->setId($lig["id"]);
|
||||
$manager->persist($niveau04);
|
||||
}
|
||||
$niveau04->setLabel($lig["label"]);
|
||||
$niveau04->setCode($lig["code"]);
|
||||
$niveau04->setPostaladress($lig["postaladress"]);
|
||||
$niveau04->setTelephonenumber($lig["telephonenumber"]);
|
||||
$niveau04->setEmail($lig["email"]);
|
||||
$niveau04->setApikey($lig["apikey"]);
|
||||
$niveau04->setNiveau03($niveau03);
|
||||
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
// User MODO
|
||||
$this->writeln("User Modo");
|
||||
$userid=-99;
|
||||
$usercpt=0;
|
||||
$niveau01s=$manager->getRepository('App\Entity\Niveau01')->findAll();
|
||||
foreach($niveau01s as $niveau01) {
|
||||
$userid=$userid-1;
|
||||
$usercpt=$usercpt+1;
|
||||
$username="modo".str_pad($usercpt,3,"0", STR_PAD_LEFT);
|
||||
|
||||
$user=$manager->getRepository('App\Entity\User')->find($userid);
|
||||
if(!$user) {
|
||||
$user=new User();
|
||||
$user->setId($userid);
|
||||
$manager->persist($user);
|
||||
|
||||
$usermodo=new UserModo();
|
||||
$usermodo->setUser($user);
|
||||
$usermodo->setNiveau01($niveau01);
|
||||
$manager->persist($usermodo);
|
||||
}
|
||||
|
||||
$user->setUsername($username);
|
||||
$user->setPassword($username);
|
||||
$user->setRoles(["ROLE_MODO"]);
|
||||
$user->setFirstname(str_pad($usercpt,3,"0", STR_PAD_LEFT));
|
||||
$user->setLastname("Modo");
|
||||
$user->setEmail($username."@noreply.fr");
|
||||
$user->setIsvisible(true);
|
||||
$user->setIsactive(true);
|
||||
$user->setAvatar("noavatar.png");
|
||||
$user->setApikey($username);
|
||||
$user->setNiveau01($niveau01);
|
||||
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
// User MASTER
|
||||
$this->writeln("User Master");
|
||||
$userid=-199;
|
||||
$usercpt=0;
|
||||
$niveau02s=$manager->getRepository('App\Entity\Niveau02')->findAll();
|
||||
foreach($niveau02s as $niveau02) {
|
||||
$userid=$userid-1;
|
||||
$usercpt=$usercpt+1;
|
||||
$username="master".str_pad($usercpt,3,"0", STR_PAD_LEFT);
|
||||
|
||||
$user=$manager->getRepository('App\Entity\User')->find($userid);
|
||||
if(!$user) {
|
||||
$user=new User();
|
||||
$user->setId($userid);
|
||||
$manager->persist($user);
|
||||
}
|
||||
|
||||
$user->setUsername($username);
|
||||
$user->setPassword($username);
|
||||
$user->setRoles(["ROLE_MASTER"]);
|
||||
$user->setFirstname(str_pad($usercpt,3,"0", STR_PAD_LEFT));
|
||||
$user->setLastname("Master");
|
||||
$user->setEmail($username."@noreply.fr");
|
||||
$user->setIsvisible(true);
|
||||
$user->setIsactive(true);
|
||||
$user->setAvatar("noavatar.png");
|
||||
$user->setApikey($username);
|
||||
$user->setNiveau01($niveau02->getNiveau01());
|
||||
$user->setNiveau02($niveau02);
|
||||
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
// User MANAGER
|
||||
$this->writeln("User Manager");
|
||||
$userid=-299;
|
||||
$usercpt=0;
|
||||
$niveau03s=$manager->getRepository('App\Entity\Niveau03')->findAll();
|
||||
foreach($niveau03s as $niveau03) {
|
||||
$userid=$userid-1;
|
||||
$usercpt=$usercpt+1;
|
||||
$username="manager".str_pad($usercpt,3,"0", STR_PAD_LEFT);
|
||||
|
||||
$user=$manager->getRepository('App\Entity\User')->find($userid);
|
||||
if(!$user) {
|
||||
$user=new User();
|
||||
$user->setId($userid);
|
||||
$manager->persist($user);
|
||||
}
|
||||
|
||||
$user->setUsername($username);
|
||||
$user->setPassword($username);
|
||||
$user->setRoles(["ROLE_MANAGER"]);
|
||||
$user->setFirstname(str_pad($usercpt,3,"0", STR_PAD_LEFT));
|
||||
$user->setLastname("Manager");
|
||||
$user->setEmail($username."@noreply.fr");
|
||||
$user->setIsvisible(true);
|
||||
$user->setIsactive(true);
|
||||
$user->setAvatar("noavatar.png");
|
||||
$user->setApikey($username);
|
||||
$user->setNiveau01($niveau03->getNiveau02()->getNiveau01());
|
||||
$user->setNiveau02($niveau03->getNiveau02());
|
||||
$user->setNiveau03($niveau03);
|
||||
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
// User USER
|
||||
$this->writeln("User User");
|
||||
$userid=-299;
|
||||
$usercpt=0;
|
||||
$niveau03s=$manager->getRepository('App\Entity\Niveau03')->findAll();
|
||||
foreach($niveau03s as $niveau03) {
|
||||
$userid=$userid-1;
|
||||
$usercpt=$usercpt+1;
|
||||
$username="user".str_pad($usercpt,3,"0", STR_PAD_LEFT);
|
||||
|
||||
$user=$manager->getRepository('App\Entity\User')->find($userid);
|
||||
if(!$user) {
|
||||
$user=new User();
|
||||
$user->setId($userid);
|
||||
$manager->persist($user);
|
||||
}
|
||||
|
||||
$user->setUsername($username);
|
||||
$user->setPassword($username);
|
||||
$user->setRoles(["ROLE_USER"]);
|
||||
$user->setFirstname(str_pad($usercpt,3,"0", STR_PAD_LEFT));
|
||||
$user->setLastname("User");
|
||||
$user->setEmail($username."@noreply.fr");
|
||||
$user->setIsvisible(true);
|
||||
$user->setIsactive(true);
|
||||
$user->setAvatar("noavatar.png");
|
||||
$user->setApikey($username);
|
||||
$user->setNiveau01($niveau03->getNiveau02()->getNiveau01());
|
||||
$user->setNiveau02($niveau03->getNiveau02());
|
||||
$user->setNiveau03($niveau03);
|
||||
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
// app:Synchro
|
||||
$manager->clear();
|
||||
$this->writeln("app:Synchro");
|
||||
$input = new ArrayInput(['command' => 'app:Synchro']);
|
||||
$boutput = new BufferedOutput();
|
||||
$application->run($input, $boutput);
|
||||
}
|
||||
|
||||
private function writeln($string) {
|
||||
$this->output->writeln(' <fg=yellow>></> <info>'.$string.'</info>');
|
||||
}
|
||||
|
||||
|
||||
private function csv_to_array($csv, $delimiter = ';', $enclosure = '', $escape = '\\', $terminator = "\n") {
|
||||
$r = array();
|
||||
$rows = explode($terminator,trim($csv));
|
||||
|
||||
$names = array_shift($rows);
|
||||
$names = str_getcsv($names,$delimiter,$enclosure,$escape);
|
||||
$nc = count($names);
|
||||
foreach ($rows as $row) {
|
||||
if (trim($row)) {
|
||||
$values = str_getcsv($row,$delimiter,$enclosure,$escape);
|
||||
if (!$values) $values = array_fill(0,$nc,null);
|
||||
@$r[] = array_combine($names,$values);
|
||||
}
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
}
|
4
src/DataFixtures/niveau01.csv
Normal file
4
src/DataFixtures/niveau01.csv
Normal file
@ -0,0 +1,4 @@
|
||||
id;label;code;postaladress;telephonenumber;email;apikey
|
||||
-1;Nv01;Nv01;;;;Nv01
|
||||
-2;Nv02;Nv02;;;;Nv02
|
||||
-3;Nv03;Nv03;;;;Nv03
|
|
7
src/DataFixtures/niveau02.csv
Normal file
7
src/DataFixtures/niveau02.csv
Normal file
@ -0,0 +1,7 @@
|
||||
id;label;code;postaladress;telephonenumber;email;apikey;codenv1
|
||||
-1;Nv01Nv01;Nv01Nv01;;;;Nv01Nv01;Nv01
|
||||
-2;Nv01Nv02;Nv01Nv02;;;;Nv01Nv02;Nv01
|
||||
-3;Nv02Nv01;Nv02Nv01;;;;Nv02Nv01;Nv02
|
||||
-4;Nv02Nv02;Nv02Nv02;;;;Nv02Nv02;Nv02
|
||||
-5;Nv03Nv01;Nv03Nv01;;;;Nv03Nv01;Nv03
|
||||
-6;Nv03Nv02;Nv03Nv02;;;;Nv03Nv02;Nv03
|
|
13
src/DataFixtures/niveau03.csv
Normal file
13
src/DataFixtures/niveau03.csv
Normal file
@ -0,0 +1,13 @@
|
||||
id;label;code;postaladress;telephonenumber;email;apikey;codenv2
|
||||
-1;Nv01Nv01Nv01;Nv01Nv01Nv01;;;;Nv01Nv01Nv01;Nv01Nv01
|
||||
-2;Nv01Nv01Nv02;Nv01Nv01Nv02;;;;Nv01Nv01Nv02;Nv01Nv01
|
||||
-3;Nv01Nv02Nv01;Nv01Nv02Nv01;;;;Nv01Nv02Nv01;Nv01Nv02
|
||||
-4;Nv01Nv02Nv02;Nv01Nv02Nv02;;;;Nv01Nv02Nv02;Nv01Nv02
|
||||
-5;Nv02Nv01Nv01;Nv02Nv01Nv01;;;;Nv02Nv01Nv01;Nv02Nv01
|
||||
-6;Nv02Nv01Nv02;Nv02Nv01Nv02;;;;Nv02Nv01Nv02;Nv02Nv01
|
||||
-7;Nv02Nv02Nv01;Nv02Nv02Nv01;;;;Nv02Nv02Nv01;Nv02Nv02
|
||||
-8;Nv02Nv02Nv02;Nv02Nv02Nv02;;;;Nv02Nv02Nv02;Nv02Nv02
|
||||
-9;Nv03Nv01Nv01;Nv03Nv01Nv01;;;;Nv03Nv01Nv01;Nv03Nv01
|
||||
-10;Nv03Nv01Nv02;Nv03Nv01Nv02;;;;Nv03Nv01Nv02;Nv03Nv01
|
||||
-11;Nv03Nv02Nv01;Nv03Nv02Nv01;;;;Nv03Nv02Nv01;Nv03Nv02
|
||||
-12;Nv03Nv02Nv02;Nv03Nv02Nv02;;;;Nv03Nv02Nv02;Nv03Nv02
|
|
25
src/DataFixtures/niveau04.csv
Normal file
25
src/DataFixtures/niveau04.csv
Normal file
@ -0,0 +1,25 @@
|
||||
id;label;code;postaladress;telephonenumber;email;apikey;codenv3
|
||||
-1;Nv01Nv01Nv01Nv01;Nv01Nv01Nv01Nv01;;;;Nv01Nv01Nv01Nv01;Nv01Nv01Nv01
|
||||
-2;Nv01Nv01Nv01Nv02;Nv01Nv01Nv01Nv02;;;;Nv01Nv01Nv01Nv02;Nv01Nv01Nv01
|
||||
-3;Nv01Nv01Nv02Nv01;Nv01Nv01Nv02Nv01;;;;Nv01Nv01Nv02Nv01;Nv01Nv01Nv02
|
||||
-4;Nv01Nv01Nv02Nv02;Nv01Nv01Nv02Nv02;;;;Nv01Nv01Nv02Nv02;Nv01Nv01Nv02
|
||||
-5;Nv01Nv02Nv01Nv01;Nv01Nv02Nv01Nv01;;;;Nv01Nv02Nv01Nv01;Nv01Nv02Nv01
|
||||
-6;Nv01Nv02Nv01Nv02;Nv01Nv02Nv01Nv02;;;;Nv01Nv02Nv01Nv02;Nv01Nv02Nv01
|
||||
-7;Nv01Nv02Nv02Nv01;Nv01Nv02Nv02Nv01;;;;Nv01Nv02Nv02Nv01;Nv01Nv02Nv02
|
||||
-8;Nv01Nv02Nv02Nv02;Nv01Nv02Nv02Nv02;;;;Nv01Nv02Nv02Nv02;Nv01Nv02Nv02
|
||||
-9;Nv02Nv01Nv01Nv01;Nv02Nv01Nv01Nv01;;;;Nv02Nv01Nv01Nv01;Nv02Nv01Nv01
|
||||
-10;Nv02Nv01Nv01Nv02;Nv02Nv01Nv01Nv02;;;;Nv02Nv01Nv01Nv02;Nv02Nv01Nv01
|
||||
-11;Nv02Nv01Nv02Nv01;Nv02Nv01Nv02Nv01;;;;Nv02Nv01Nv02Nv01;Nv02Nv01Nv02
|
||||
-12;Nv02Nv01Nv02Nv02;Nv02Nv01Nv02Nv02;;;;Nv02Nv01Nv02Nv02;Nv02Nv01Nv02
|
||||
-13;Nv02Nv02Nv01Nv01;Nv02Nv02Nv01Nv01;;;;Nv02Nv02Nv01Nv01;Nv02Nv02Nv01
|
||||
-14;Nv02Nv02Nv01Nv02;Nv02Nv02Nv01Nv02;;;;Nv02Nv02Nv01Nv02;Nv02Nv02Nv01
|
||||
-15;Nv02Nv02Nv02Nv01;Nv02Nv02Nv02Nv01;;;;Nv02Nv02Nv02Nv01;Nv02Nv02Nv02
|
||||
-16;Nv02Nv02Nv02Nv02;Nv02Nv02Nv02Nv02;;;;Nv02Nv02Nv02Nv02;Nv02Nv02Nv02
|
||||
-17;Nv03Nv01Nv01Nv01;Nv03Nv01Nv01Nv01;;;;Nv03Nv01Nv01Nv01;Nv03Nv01Nv01
|
||||
-18;Nv03Nv01Nv01Nv02;Nv03Nv01Nv01Nv02;;;;Nv03Nv01Nv01Nv02;Nv03Nv01Nv01
|
||||
-19;Nv03Nv01Nv02Nv01;Nv03Nv01Nv02Nv01;;;;Nv03Nv01Nv02Nv01;Nv03Nv01Nv02
|
||||
-20;Nv03Nv01Nv02Nv02;Nv03Nv01Nv02Nv02;;;;Nv03Nv01Nv02Nv02;Nv03Nv01Nv02
|
||||
-21;Nv03Nv02Nv01Nv01;Nv03Nv02Nv01Nv01;;;;Nv03Nv02Nv01Nv01;Nv03Nv02Nv01
|
||||
-22;Nv03Nv02Nv01Nv02;Nv03Nv02Nv01Nv02;;;;Nv03Nv02Nv01Nv02;Nv03Nv02Nv01
|
||||
-23;Nv03Nv02Nv02Nv01;Nv03Nv02Nv02Nv01;;;;Nv03Nv02Nv02Nv01;Nv03Nv02Nv02
|
||||
-24;Nv03Nv02Nv02Nv02;Nv03Nv02Nv02Nv02;;;;Nv03Nv02Nv02Nv02;Nv03Nv02Nv02
|
|
@ -104,14 +104,6 @@ class Niveau01
|
||||
*/
|
||||
private $modos;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->niveau02s = new ArrayCollection();
|
||||
$this->registrations = new ArrayCollection();
|
||||
$this->users = new ArrayCollection();
|
||||
$this->modos = new ArrayCollection();
|
||||
}
|
||||
|
||||
// == CODE A NE PAS REGENERER
|
||||
public function setId(int $id): self
|
||||
{
|
||||
@ -121,6 +113,14 @@ class Niveau01
|
||||
}
|
||||
// == FIN DU CODE A NE PAS REGENERER
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->niveau02s = new ArrayCollection();
|
||||
$this->registrations = new ArrayCollection();
|
||||
$this->users = new ArrayCollection();
|
||||
$this->modos = new ArrayCollection();
|
||||
}
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
|
@ -87,6 +87,15 @@ class Niveau02
|
||||
*/
|
||||
private $users;
|
||||
|
||||
// == CODE A NE PAS REGENERER
|
||||
public function setId(int $id): self
|
||||
{
|
||||
$this->id = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
// == FIN DU CODE A NE PAS REGENERER
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->niveau03s = new ArrayCollection();
|
||||
|
@ -101,7 +101,14 @@ class Niveau03
|
||||
|
||||
return $this;
|
||||
}
|
||||
// ==
|
||||
|
||||
public function setId(int $id): self
|
||||
{
|
||||
$this->id = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
// == FIN DU CODE A NE PAS REGENERER
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
@ -108,7 +108,13 @@ class Niveau04
|
||||
return $this;
|
||||
}
|
||||
|
||||
// ==
|
||||
public function setId(int $id): self
|
||||
{
|
||||
$this->id = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
// == FIN DU CODE A NE PAS REGENERER
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
Reference in New Issue
Block a user