src/Entity/IctoTypemouvement.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\IctoTypemouvementRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=IctoTypemouvementRepository::class)
  9.  */
  10. class IctoTypemouvement
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      */
  21.     private $designation;
  22.     /**
  23.      * @ORM\OneToMany(targetEntity=IctoMouvement::class, mappedBy="typemouvement")
  24.      */
  25.     private $ictoMouvements;
  26.     public function __construct()
  27.     {
  28.         $this->ictoMouvements = new ArrayCollection();
  29.     }
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getDesignation(): ?string
  35.     {
  36.         return $this->designation;
  37.     }
  38.     public function setDesignation(string $designation): self
  39.     {
  40.         $this->designation $designation;
  41.         return $this;
  42.     }
  43.     /**
  44.      * @return Collection<int, IctoMouvement>
  45.      */
  46.     public function getIctoMouvements(): Collection
  47.     {
  48.         return $this->ictoMouvements;
  49.     }
  50.     public function addIctoMouvement(IctoMouvement $ictoMouvement): self
  51.     {
  52.         if (!$this->ictoMouvements->contains($ictoMouvement)) {
  53.             $this->ictoMouvements[] = $ictoMouvement;
  54.             $ictoMouvement->setTypemouvement($this);
  55.         }
  56.         return $this;
  57.     }
  58.     public function removeIctoMouvement(IctoMouvement $ictoMouvement): self
  59.     {
  60.         if ($this->ictoMouvements->removeElement($ictoMouvement)) {
  61.             // set the owning side to null (unless already changed)
  62.             if ($ictoMouvement->getTypemouvement() === $this) {
  63.                 $ictoMouvement->setTypemouvement(null);
  64.             }
  65.         }
  66.         return $this;
  67.     }
  68. }