src/Entity/CommunicationMethods.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CommunicationMethodsRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassCommunicationMethodsRepository::class)]
  8. class CommunicationMethods
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\Column(type'string'length255)]
  15.     private $method;
  16.     #[ORM\Column(type'datetime')]
  17.     private $modified;
  18.     #[ORM\Column(type'datetime')]
  19.     private $created;
  20.     #[ORM\OneToMany(targetEntityClinicCommunicationMethods::class, mappedBy'communicationMethod'cascade: ['persist'])]
  21.     private $clinicCommunicationMethods;
  22.     public function __construct()
  23.     {
  24.         $this->clinicCommunicationMethods = new ArrayCollection();
  25.     }
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getMethod(): ?string
  31.     {
  32.         return $this->method;
  33.     }
  34.     public function setMethod(string $method): self
  35.     {
  36.         $this->method $method;
  37.         return $this;
  38.     }
  39.     public function getModified(): ?\DateTimeInterface
  40.     {
  41.         return $this->modified;
  42.     }
  43.     public function setModified(\DateTimeInterface $modified): self
  44.     {
  45.         $this->modified $modified;
  46.         return $this;
  47.     }
  48.     public function getCreated(): ?\DateTimeInterface
  49.     {
  50.         return $this->created;
  51.     }
  52.     public function setCreated(\DateTimeInterface $created): self
  53.     {
  54.         $this->created $created;
  55.         return $this;
  56.     }
  57.     /**
  58.      * @return Collection|ClinicCommunicationMethods[]
  59.      */
  60.     public function getClinicCommunicationMethods(): Collection
  61.     {
  62.         return $this->clinicCommunicationMethods;
  63.     }
  64.     public function addClinicCommunicationMethod(ClinicCommunicationMethods $clinicCommunicationMethod): self
  65.     {
  66.         if (!$this->clinicCommunicationMethods->contains($clinicCommunicationMethod)) {
  67.             $this->clinicCommunicationMethods[] = $clinicCommunicationMethod;
  68.             $clinicCommunicationMethod->setCommunicationMethod($this);
  69.         }
  70.         return $this;
  71.     }
  72.     public function removeClinicCommunicationMethod(ClinicCommunicationMethods $clinicCommunicationMethod): self
  73.     {
  74.         if ($this->clinicCommunicationMethods->removeElement($clinicCommunicationMethod)) {
  75.             // set the owning side to null (unless already changed)
  76.             if ($clinicCommunicationMethod->getCommunicationMethod() === $this) {
  77.                 $clinicCommunicationMethod->setCommunicationMethod(null);
  78.             }
  79.         }
  80.         return $this;
  81.     }
  82. }