mirror of
https://gitlab.aliens-lyon.fr/encartes/backend.git
synced 2026-09-11 16:50:46 +02:00
Ajout des scripts pour mettre les données dans la BDD, correction des attributs Doctrine (certains, pas tous)
This commit is contained in:
@@ -19,7 +19,6 @@ class Place
|
||||
#[ORM\Column(type: "integer")]
|
||||
private $id;
|
||||
|
||||
#[ORM\Type]
|
||||
#[ORM\Column(type: "string")]
|
||||
// Either 'C'orridor , 'S'tairs , 'E'levator or 'R'oom
|
||||
private $type;
|
||||
@@ -132,7 +131,7 @@ class Place
|
||||
return $this->floors;
|
||||
}
|
||||
|
||||
public function addFloor(self $floor): self
|
||||
public function addFloor(Floor $floor): self
|
||||
{
|
||||
if (!$this->floors->contains($floor)) {
|
||||
$this->floors[] = $floor;
|
||||
@@ -140,7 +139,7 @@ class Place
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeFloor(self $floor): self
|
||||
public function removeFloor(Floor $floor): self
|
||||
{
|
||||
$this->floors->removeElement($floor);
|
||||
return $this;
|
||||
@@ -264,7 +263,7 @@ class Place
|
||||
{
|
||||
if (!$this->CylinderRepresentation->contains($cylinderRepresentation)) {
|
||||
$this->CylinderRepresentation[] = $cylinderRepresentation;
|
||||
$cylinderRepresentation->setRoom($this);
|
||||
$cylinderRepresentation->setPlace($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
@@ -274,8 +273,8 @@ class Place
|
||||
{
|
||||
if ($this->CylinderRepresentation->removeElement($cylinderRepresentation)) {
|
||||
// set the owning side to null (unless already changed)
|
||||
if ($cylinderRepresentation->getRoom() === $this) {
|
||||
$cylinderRepresentation->setRoom(null);
|
||||
if ($cylinderRepresentation->getPlace() === $this) {
|
||||
$cylinderRepresentation->setPlace(null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -295,7 +294,7 @@ class Place
|
||||
{
|
||||
if (!$this->PolySurfaceRepresentation->contains($polySurfaceRepresentation)) {
|
||||
$this->PolySurfaceRepresentation[] = $polySurfaceRepresentation;
|
||||
$polySurfaceRepresentation->setRoom($this);
|
||||
$polySurfaceRepresentation->setPlace($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
@@ -305,8 +304,8 @@ class Place
|
||||
{
|
||||
if ($this->PolySurfaceRepresentation->removeElement($polySurfaceRepresentation)) {
|
||||
// set the owning side to null (unless already changed)
|
||||
if ($polySurfaceRepresentation->getRoom() === $this) {
|
||||
$polySurfaceRepresentation->setRoom(null);
|
||||
if ($polySurfaceRepresentation->getPlace() === $this) {
|
||||
$polySurfaceRepresentation->setPlace(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user