src/Entity/EnqueteEntrepriseSectionChild.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EnqueteEntrepriseSectionChildRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=EnqueteEntrepriseSectionChildRepository::class)
  9.  */
  10. class EnqueteEntrepriseSectionChild
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="text")
  20.      */
  21.     private $libelle;
  22.     /**
  23.      * @ORM\Column(type="integer")
  24.      */
  25.     private $position;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity=EnqueteEntrepriseSection::class, inversedBy="enqueteEntrepriseSectionChildren")
  28.      * @ORM\JoinColumn(nullable=false)
  29.      */
  30.     private $enqueteEntrepriseSection;
  31.     /**
  32.      * @ORM\OneToMany(targetEntity=EnqueteEntrepriseSectionChildValue::class, mappedBy="enqueteEntrepriseSectionChild")
  33.      */
  34.     private $enqueteEntrepriseSectionChildValues;
  35.     public function __construct()
  36.     {
  37.         $this->enqueteEntrepriseSectionChildValues = new ArrayCollection();
  38.     }
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getLibelle(): ?string
  44.     {
  45.         return $this->libelle;
  46.     }
  47.     public function setLibelle(string $libelle): self
  48.     {
  49.         $this->libelle $libelle;
  50.         return $this;
  51.     }
  52.     public function getPosition(): ?int
  53.     {
  54.         return $this->position;
  55.     }
  56.     public function setPosition(int $value): self
  57.     {
  58.         $this->position $value;
  59.         return $this;
  60.     }
  61.     public function getEnqueteEntrepriseSection(): ?EnqueteEntrepriseSection
  62.     {
  63.         return $this->enqueteEntrepriseSection;
  64.     }
  65.     public function setEnqueteEntrepriseSection(?EnqueteEntrepriseSection $enqueteEntrepriseSection): self
  66.     {
  67.         $this->enqueteEntrepriseSection $enqueteEntrepriseSection;
  68.         return $this;
  69.     }
  70.     /**
  71.      * @return Collection<int, EnqueteEntrepriseSectionChildValue>
  72.      */
  73.     public function getEnqueteEntrepriseSectionChildValues(): Collection
  74.     {
  75.         return $this->enqueteEntrepriseSectionChildValues;
  76.     }
  77.     public function addEnqueteEntrepriseSectionChildValue(EnqueteEntrepriseSectionChildValue $enqueteEntrepriseSectionChildValue): self
  78.     {
  79.         if (!$this->enqueteEntrepriseSectionChildValues->contains($enqueteEntrepriseSectionChildValue)) {
  80.             $this->enqueteEntrepriseSectionChildValues[] = $enqueteEntrepriseSectionChildValue;
  81.             $enqueteEntrepriseSectionChildValue->setEnqueteEntrepriseSectionChild($this);
  82.         }
  83.         return $this;
  84.     }
  85.     public function removeEnqueteEntrepriseSectionChildValue(EnqueteEntrepriseSectionChildValue $enqueteEntrepriseSectionChildValue): self
  86.     {
  87.         if ($this->enqueteEntrepriseSectionChildValues->removeElement($enqueteEntrepriseSectionChildValue)) {
  88.             // set the owning side to null (unless already changed)
  89.             if ($enqueteEntrepriseSectionChildValue->getEnqueteEntrepriseSectionChild() === $this) {
  90.                 $enqueteEntrepriseSectionChildValue->setEnqueteEntrepriseSectionChild(null);
  91.             }
  92.         }
  93.         return $this;
  94.     }
  95. }