Exemplo n.º 1
0
 public function __construct($object = '', $description = '', $location = '')
 {
     $this->setId(-1);
     $this->setObject($object);
     $this->setDescription($description);
     $this->setLocation($location);
     $this->dateStart = new \DateTime();
     $this->dateStart->add(new \DateInterval('P1D'));
     $this->dateStart->setTime($this->dateStart->format('H'), $this->dateStart->format('i') - $this->dateStart->format('i') % 15, $this->dateStart->format('s'));
     $this->dateEnd = new \DateTime();
     $this->dateEnd->add(new \DateInterval('P1DT2H'));
     $this->dateEnd->setTime($this->dateEnd->format('H'), $this->dateEnd->format('i') - $this->dateEnd->format('i') % 15, $this->dateEnd->format('s'));
     $this->participants = new ArrayCollection();
     $this->childs = new ArrayCollection();
 }