src/Entity/Main/Calendar.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Main;
  3. use App\Repository\CalendarRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=CalendarRepository::class)
  7.  */
  8. class Calendar
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="string", length=255, nullable=true)
  18.      */
  19.     private $designation;
  20.     /**
  21.      * @ORM\Column(type="string", length=20)
  22.      */
  23.     private $type;
  24.     /**
  25.      * @ORM\Column(type="datetime")
  26.      */
  27.     private $from_date;
  28.     // Pour le formulaire
  29.     private $date_from;
  30.     private $hour_from;
  31.     /**
  32.      * @ORM\Column(type="datetime")
  33.      */
  34.     private $to_date;
  35.     // Pour le formulaire
  36.     private $date_to;
  37.     private $hour_to;   
  38.     /**
  39.      * @ORM\Column(type="integer")
  40.      */
  41.     private $priority;
  42.     
  43.     private $dateTimeZone;
  44.     /**
  45.      * @ORM\Column(type="string", length=255, nullable=true)
  46.      */
  47.     private $activityClosed;
  48.     /**
  49.      * Constructor
  50.      */
  51.     public function __construct()
  52.     {
  53.         $this->dateTimeZone = new \DateTimeZone('Europe/Paris'); 
  54.         $this->hour_from = new \DateTime('2000-01-01 01:00:00'$this->dateTimeZone);
  55.         $this->hour_to = new \DateTime('2000-01-01 01:00:00'$this->dateTimeZone);
  56.     }
  57.     public function getId(): ?int
  58.     {
  59.         return $this->id;
  60.     }
  61.     public function getDesignation(): ?string
  62.     {
  63.         return $this->designation;
  64.     }
  65.     public function setDesignation(?string $designation): self
  66.     {
  67.         $this->designation $designation;
  68.         return $this;
  69.     }
  70.     public function getType(): ?string
  71.     {
  72.         return $this->type;
  73.     }
  74.     public function setType(string $type): self
  75.     {
  76.         $this->type $type;
  77.         return $this;
  78.     }
  79.     public function getFromDate(): ?\DateTimeInterface
  80.     {
  81.         return $this->from_date;
  82.     }
  83.     public function setFromDate(\DateTimeInterface $from_date): self
  84.     {
  85.         $this->from_date $from_date;
  86.         return $this;
  87.     }
  88.     public function getToDate(): ?\DateTimeInterface
  89.     {
  90.         return $this->to_date;
  91.     }
  92.     public function setToDate(\DateTimeInterface $to_date): self
  93.     {
  94.         $this->to_date $to_date;
  95.         return $this;
  96.     }
  97.     public function getPriority(): ?int
  98.     {
  99.         return $this->priority;
  100.     }
  101.     public function setPriority(int $priority): self
  102.     {
  103.         $this->priority $priority;
  104.         return $this;
  105.     }
  106.     public function getActivityClosed(): ?string
  107.     {
  108.         return $this->activityClosed;
  109.     }
  110.     public function setActivityClosed(?string $activityClosed): self
  111.     {
  112.         $this->activityClosed $activityClosed;
  113.         return $this;
  114.     }
  115. }