src/Entity/SpeakerConsultationRepeat.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SpeakerConsultationRepeatRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=SpeakerConsultationRepeatRepository::class)
  9.  */
  10. class SpeakerConsultationRepeat
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="integer")
  20.      */
  21.     private $every 1;
  22.     /**
  23.      * @ORM\Column(type="string", length=5)
  24.      */
  25.     private $type 'day';
  26.     /**
  27.      * @ORM\Column(type="array", nullable=true)
  28.      */
  29.     private $weekDay = [];
  30.     /**
  31.      * @ORM\Column(type="integer", nullable=true)
  32.      */
  33.     private $monthDay;
  34.     /**
  35.      * @ORM\Column(type="date")
  36.      */
  37.     private $endDate;
  38.     /**
  39.      * @ORM\OneToMany(targetEntity=SpeakerConsultation::class, mappedBy="repeatSettings")
  40.      */
  41.     private $speakerConsultations;
  42.     public function __construct()
  43.     {
  44.         $this->speakerConsultations = new ArrayCollection();
  45.     }
  46.     public function getId(): ?int
  47.     {
  48.         return $this->id;
  49.     }
  50.     public function getEvery(): ?int
  51.     {
  52.         return $this->every;
  53.     }
  54.     public function setEvery(int $every): self
  55.     {
  56.         $this->every $every;
  57.         return $this;
  58.     }
  59.     public function getType(): ?string
  60.     {
  61.         return $this->type;
  62.     }
  63.     public function setType(string $type): self
  64.     {
  65.         $this->type $type;
  66.         return $this;
  67.     }
  68.     public function getWeekDay(): ?array
  69.     {
  70.         return $this->weekDay;
  71.     }
  72.     public function setWeekDay(?array $weekDay): self
  73.     {
  74.         $this->weekDay $weekDay;
  75.         return $this;
  76.     }
  77.     public function getMonthDay(): ?int
  78.     {
  79.         return $this->monthDay;
  80.     }
  81.     public function setMonthDay(?int $monthDay): self
  82.     {
  83.         $this->monthDay $monthDay;
  84.         return $this;
  85.     }
  86.     public function getEndDate(): ?\DateTimeInterface
  87.     {
  88.         return $this->endDate;
  89.     }
  90.     public function setEndDate(\DateTimeInterface $endDate): self
  91.     {
  92.         $this->endDate $endDate;
  93.         return $this;
  94.     }
  95.     /**
  96.      * @return Collection|SpeakerConsultation[]
  97.      */
  98.     public function getSpeakerConsultations(): Collection
  99.     {
  100.         return $this->speakerConsultations;
  101.     }
  102.     public function addSpeakerConsultation(SpeakerConsultation $speakerConsultation): self
  103.     {
  104.         if (!$this->speakerConsultations->contains($speakerConsultation)) {
  105.             $this->speakerConsultations[] = $speakerConsultation;
  106.             $speakerConsultation->setRepeatSettings($this);
  107.         }
  108.         return $this;
  109.     }
  110.     public function removeSpeakerConsultation(SpeakerConsultation $speakerConsultation): self
  111.     {
  112.         if ($this->speakerConsultations->removeElement($speakerConsultation)) {
  113.             // set the owning side to null (unless already changed)
  114.             if ($speakerConsultation->getRepeatSettings() === $this) {
  115.                 $speakerConsultation->setRepeatSettings(null);
  116.             }
  117.         }
  118.         return $this;
  119.     }
  120. }