src/Entity/CalendarEvent.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CalendarEventRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=CalendarEventRepository::class)
  9.  */
  10. class CalendarEvent
  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 $idevent;
  22.     /**
  23.      * @ORM\Column(type="text")
  24.      */
  25.     private $title;
  26.     /**
  27.      * @ORM\Column(type="string", length=200)
  28.      */
  29.     private $start;
  30.     /**
  31.      * @ORM\Column(type="string", length=200, nullable=true)
  32.      */
  33.     private $end;
  34.     /**
  35.      * @ORM\Column(type="string", length=7)
  36.      */
  37.     private $backgroundcolor;
  38.     /**
  39.      * @ORM\Column(type="string", length=7)
  40.      */
  41.     private $bordercolor;
  42.     /**
  43.      * @ORM\Column(type="boolean", nullable=true)
  44.      */
  45.     private $isdone;
  46.     /**
  47.      * @ORM\ManyToOne(targetEntity=Site::class, inversedBy="calendarEvents")
  48.      */
  49.     private $site;
  50.     /**
  51.      * @ORM\OneToMany(targetEntity=DemandeByCanal::class, mappedBy="calendar")
  52.      */
  53.     private $demandeByCanals;
  54.     /**
  55.      * @ORM\OneToMany(targetEntity=DemandePro::class, mappedBy="calandar")
  56.      */
  57.     private $demandePros;
  58.     public function __construct()
  59.     {
  60.         $this->demandeByCanals = new ArrayCollection();
  61.         $this->demandePros = new ArrayCollection();
  62.     }
  63.     public function getId(): ?int
  64.     {
  65.         return $this->id;
  66.     }
  67.     public function getIdevent(): ?int
  68.     {
  69.         return $this->idevent;
  70.     }
  71.     public function setIdevent(int $idevent): self
  72.     {
  73.         $this->idevent $idevent;
  74.         return $this;
  75.     }
  76.     public function getTitle(): ?string
  77.     {
  78.         return $this->title;
  79.     }
  80.     public function setTitle(string $title): self
  81.     {
  82.         $this->title $title;
  83.         return $this;
  84.     }
  85.     public function getStart(): ?String
  86.     {
  87.         return $this->start;
  88.     }
  89.     public function setStart(String $start): self
  90.     {
  91.         $this->start $start;
  92.         return $this;
  93.     }
  94.     public function getEnd(): ?String
  95.     {
  96.         return $this->end;
  97.     }
  98.     public function setEnd(?String $end): self
  99.     {
  100.         $this->end $end;
  101.         return $this;
  102.     }
  103.     public function getBackgroundcolor(): ?string
  104.     {
  105.         return $this->backgroundcolor;
  106.     }
  107.     public function setBackgroundcolor(string $backgroundcolor): self
  108.     {
  109.         $this->backgroundcolor $backgroundcolor;
  110.         return $this;
  111.     }
  112.     public function getBordercolor(): ?string
  113.     {
  114.         return $this->bordercolor;
  115.     }
  116.     public function setBordercolor(string $bordercolor): self
  117.     {
  118.         $this->bordercolor $bordercolor;
  119.         return $this;
  120.     }
  121.     public function isIsdone(): ?bool
  122.     {
  123.         return $this->isdone;
  124.     }
  125.     public function setIsdone(?bool $isdone): self
  126.     {
  127.         $this->isdone $isdone;
  128.         return $this;
  129.     }
  130.     public function getSite(): ?Site
  131.     {
  132.         return $this->site;
  133.     }
  134.     public function setSite(?Site $site): self
  135.     {
  136.         $this->site $site;
  137.         return $this;
  138.     }
  139.     /**
  140.      * @return Collection<int, DemandeByCanal>
  141.      */
  142.     public function getDemandeByCanals(): Collection
  143.     {
  144.         return $this->demandeByCanals;
  145.     }
  146.     public function addDemandeByCanal(DemandeByCanal $demandeByCanal): self
  147.     {
  148.         if (!$this->demandeByCanals->contains($demandeByCanal)) {
  149.             $this->demandeByCanals[] = $demandeByCanal;
  150.             $demandeByCanal->setCalendar($this);
  151.         }
  152.         return $this;
  153.     }
  154.     public function removeDemandeByCanal(DemandeByCanal $demandeByCanal): self
  155.     {
  156.         if ($this->demandeByCanals->removeElement($demandeByCanal)) {
  157.             // set the owning side to null (unless already changed)
  158.             if ($demandeByCanal->getCalendar() === $this) {
  159.                 $demandeByCanal->setCalendar(null);
  160.             }
  161.         }
  162.         return $this;
  163.     }
  164.     /**
  165.      * @return Collection<int, DemandePro>
  166.      */
  167.     public function getDemandePros(): Collection
  168.     {
  169.         return $this->demandePros;
  170.     }
  171.     public function addDemandePro(DemandePro $demandePro): self
  172.     {
  173.         if (!$this->demandePros->contains($demandePro)) {
  174.             $this->demandePros[] = $demandePro;
  175.             $demandePro->setCalandar($this);
  176.         }
  177.         return $this;
  178.     }
  179.     public function removeDemandePro(DemandePro $demandePro): self
  180.     {
  181.         if ($this->demandePros->removeElement($demandePro)) {
  182.             // set the owning side to null (unless already changed)
  183.             if ($demandePro->getCalandar() === $this) {
  184.                 $demandePro->setCalandar(null);
  185.             }
  186.         }
  187.         return $this;
  188.     }
  189. }