src/Entity/FicheEval.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FicheEvalRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassFicheEvalRepository::class)]
  8. class FicheEval
  9. {
  10.     const TYPE_ARRAY = [
  11.         'SATISFACTION' => 0,
  12.         'ACQUIS' => 1,
  13.         'PREREQUIS' => 2
  14.     ];
  15.     #[ORM\Id]
  16.     #[ORM\GeneratedValue]
  17.     #[ORM\Column]
  18.     private ?int $id null;
  19.     #[ORM\Column(nullablefalse)]
  20.     private ?int $type null;
  21.     #[ORM\ManyToOne(inversedBy'ficheEvals')]
  22.     #[ORM\JoinColumn(nullablefalse)]
  23.     private ?Module $module null;
  24.     #[ORM\Column]
  25.     private ?bool $validated false;
  26.     #[ORM\OneToMany(mappedBy'fiche'targetEntityCritereEvaluation::class, cascade: ['persist''remove'], orphanRemovaltrue)]
  27.     private Collection $critereEvaluations;
  28.     #[ORM\Column(length255nullabletrue)]
  29.     private ?string $label null;
  30.     #[ORM\OneToMany(mappedBy'fiche'targetEntityCandidatFiche::class, orphanRemovaltrue)]
  31.     private Collection $candidatFiches;
  32.     public function __construct()
  33.     {
  34.         $this->critereEvaluations = new ArrayCollection();
  35.         $this->candidatFiches = new ArrayCollection();
  36.     }
  37.     public function getId(): ?int
  38.     {
  39.         return $this->id;
  40.     }
  41.     public function getType(): ?string
  42.     {
  43.         return $this->type;
  44.     }
  45.     public function setType(?int $type): self
  46.     {
  47.         $this->type $type;
  48.         return $this;
  49.     }
  50.     public function getModule(): ?Module
  51.     {
  52.         return $this->module;
  53.     }
  54.     public function setModule(?Module $module): self
  55.     {
  56.         $this->module $module;
  57.         return $this;
  58.     }
  59.     public function isValidated(): ?bool
  60.     {
  61.         return $this->validated;
  62.     }
  63.     public function setValidated(bool $validated): self
  64.     {
  65.         $this->validated $validated;
  66.         return $this;
  67.     }
  68.     /**
  69.      * @return Collection<int, CritereEvaluation>
  70.      */
  71.     public function getCritereEvaluations(): Collection
  72.     {
  73.         return $this->critereEvaluations;
  74.     }
  75.     public function addCritereEvaluation(CritereEvaluation $critereEvaluation): self
  76.     {
  77.         if (!$this->critereEvaluations->contains($critereEvaluation)) {
  78.             $this->critereEvaluations->add($critereEvaluation);
  79.             $critereEvaluation->setFiche($this);
  80.         }
  81.         return $this;
  82.     }
  83.     public function removeCritereEvaluation(CritereEvaluation $critereEvaluation): self
  84.     {
  85.         if ($this->critereEvaluations->removeElement($critereEvaluation)) {
  86.             // set the owning side to null (unless already changed)
  87.             if ($critereEvaluation->getFiche() === $this) {
  88.                 $critereEvaluation->setFiche(null);
  89.             }
  90.         }
  91.         return $this;
  92.     }
  93.     public function getLabel(): ?string
  94.     {
  95.         return $this->label;
  96.     }
  97.     public function setLabel(?string $label): self
  98.     {
  99.         $this->label $label;
  100.         return $this;
  101.     }
  102.     /**
  103.      * @return Collection<int, CandidatFiche>
  104.      */
  105.     public function getCandidatFiches(): Collection
  106.     {
  107.         return $this->candidatFiches;
  108.     }
  109.     public function addCandidatFich(CandidatFiche $candidatFich): self
  110.     {
  111.         if (!$this->candidatFiches->contains($candidatFich)) {
  112.             $this->candidatFiches->add($candidatFich);
  113.             $candidatFich->setFiche($this);
  114.         }
  115.         return $this;
  116.     }
  117.     public function removeCandidatFich(CandidatFiche $candidatFich): self
  118.     {
  119.         if ($this->candidatFiches->removeElement($candidatFich)) {
  120.             // set the owning side to null (unless already changed)
  121.             if ($candidatFich->getFiche() === $this) {
  122.                 $candidatFich->setFiche(null);
  123.             }
  124.         }
  125.         return $this;
  126.     }
  127. }