fix(morelevel): ajout de niveau03 et niveau04
All checks were successful
Cadoles/nineskeletor/pipeline/head This commit looks good
All checks were successful
Cadoles/nineskeletor/pipeline/head This commit looks good
This commit is contained in:
@ -43,6 +43,14 @@ class Niveau02
|
||||
*/
|
||||
private $niveau01;
|
||||
|
||||
/**
|
||||
* @var ArrayCollection
|
||||
* @var Registration
|
||||
*
|
||||
* @ORM\OneToMany(targetEntity="Niveau03", mappedBy="niveau02", cascade={"persist"}, orphanRemoval=false)
|
||||
*/
|
||||
private $niveau03s;
|
||||
|
||||
/**
|
||||
* @var ArrayCollection
|
||||
* @var Registration
|
||||
@ -61,6 +69,7 @@ class Niveau02
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->niveau03s = new ArrayCollection();
|
||||
$this->registrations = new ArrayCollection();
|
||||
$this->users = new ArrayCollection();
|
||||
}
|
||||
@ -106,6 +115,36 @@ class Niveau02
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, Niveau03>
|
||||
*/
|
||||
public function getNiveau03s(): Collection
|
||||
{
|
||||
return $this->niveau03s;
|
||||
}
|
||||
|
||||
public function addNiveau03(Niveau03 $niveau03): self
|
||||
{
|
||||
if (!$this->niveau03s->contains($niveau03)) {
|
||||
$this->niveau03s->add($niveau03);
|
||||
$niveau03->setNiveau02($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeNiveau03(Niveau03 $niveau03): self
|
||||
{
|
||||
if ($this->niveau03s->removeElement($niveau03)) {
|
||||
// set the owning side to null (unless already changed)
|
||||
if ($niveau03->getNiveau02() === $this) {
|
||||
$niveau03->setNiveau02(null);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, Registration>
|
||||
*/
|
||||
@ -117,7 +156,7 @@ class Niveau02
|
||||
public function addRegistration(Registration $registration): self
|
||||
{
|
||||
if (!$this->registrations->contains($registration)) {
|
||||
$this->registrations[] = $registration;
|
||||
$this->registrations->add($registration);
|
||||
$registration->setNiveau02($this);
|
||||
}
|
||||
|
||||
@ -147,7 +186,7 @@ class Niveau02
|
||||
public function addUser(User $user): self
|
||||
{
|
||||
if (!$this->users->contains($user)) {
|
||||
$this->users[] = $user;
|
||||
$this->users->add($user);
|
||||
$user->setNiveau02($this);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user