src/Entity/Justificatif.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\JustificatifRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=JustificatifRepository::class)
  9.  */
  10. class Justificatif
  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 $wording;
  22.     /**
  23.      * @ORM\Column(type="boolean", nullable=true)
  24.      */
  25.     private $state;
  26.     /**
  27.      * @ORM\OneToMany(targetEntity=JustifForm::class, mappedBy="justificatif")
  28.      */
  29.     private $justifForms
  30.     /**
  31.      * @ORM\Column(type="string", length=1, nullable=true)
  32.     */
  33.     private $uniquePiece;  
  34.     public function __construct()
  35.     {
  36.         $this->justifForms = new ArrayCollection();
  37.     }
  38.     public function getId(): ?int
  39.     {
  40.         return $this->id;
  41.     }
  42.     public function getWording(): ?string
  43.     {
  44.         return $this->wording;
  45.     }
  46.     public function setWording(string $wording): self
  47.     {
  48.         $this->wording $wording;
  49.         return $this;
  50.     }
  51.     public function isState(): ?bool
  52.     {
  53.         return $this->state;
  54.     }
  55.     public function setState(?bool $state): self
  56.     {
  57.         $this->state $state;
  58.         return $this;
  59.     }
  60.     /**
  61.      * @return Collection<int, JustifForm>
  62.      */
  63.     public function getJustifForms(): Collection
  64.     {
  65.         return $this->justifForms;
  66.     }
  67.     public function addJustifForm(JustifForm $justifForm): self
  68.     {
  69.         if (!$this->justifForms->contains($justifForm)) {
  70.             $this->justifForms[] = $justifForm;
  71.             $justifForm->setJustificatif($this);
  72.         }
  73.         return $this;
  74.     }
  75.     public function removeJustifForm(JustifForm $justifForm): self
  76.     {
  77.         if ($this->justifForms->removeElement($justifForm)) {
  78.             // set the owning side to null (unless already changed)
  79.             if ($justifForm->getJustificatif() === $this) {
  80.                 $justifForm->setJustificatif(null);
  81.             }
  82.         }
  83.         return $this;
  84.     } 
  85.     public function getUniquePiece(): ?string
  86.     {
  87.         return $this->uniquePiece;
  88.     } 
  89.     public function setUniquePiece(string $uniquePiece): self
  90.     {
  91.         $this->uniquePiece $uniquePiece;
  92.         return $this
  93.     }
  94. }