record single task states transition and add them in timeline

This commit is contained in:
2018-05-03 23:38:08 +02:00
parent 57169b3148
commit 86f7188d4a
17 changed files with 645 additions and 7 deletions

View File

@@ -4,6 +4,7 @@ namespace Chill\TaskBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\Common\Collections\Collection;
/**
* SingleTask
@@ -58,8 +59,25 @@ class SingleTask extends AbstractTask
* )
*/
private $recurringTask;
/**
*
* @var \Doctrine\Common\Collections\Collection
* @ORM\OneToMany(
* targetEntity="\Chill\TaskBundle\Entity\Task\SingleTaskPlaceEvent",
* mappedBy="task"
* )
*/
private $taskPlaceEvents;
public function __construct()
{
$this->taskPlaceEvents = $events = new \Doctrine\Common\Collections\ArrayCollection;
parent::__construct();
}
/**
* Get id
*
@@ -174,6 +192,16 @@ class SingleTask extends AbstractTask
$this->recurringTask = $recurringTask;
}
public function getTaskPlaceEvents(): Collection
{
return $this->taskPlaceEvents;
}
public function setTaskPlaceEvents(Collection $taskPlaceEvents)
{
$this->taskPlaceEvents = $taskPlaceEvents;
return $this;
}
}