* team labels added

* cli task added
This commit is contained in:
Dávid Danyi
2018-09-06 15:38:03 +02:00
parent cfc388aa77
commit 9563eae0b1
7 changed files with 139 additions and 2 deletions

View File

@@ -36,6 +36,12 @@ class Team implements JsonSerializable
*/
private $members;
/**
* @ORM\Column(name="labels", type="json", nullable=true)
* @var array
*/
private $labels;
/**
* @ORM\ManyToMany(targetEntity="Slide", mappedBy="teams", cascade={"persist", "remove"})
* @ORM\JoinTable(
@@ -104,6 +110,7 @@ class Team implements JsonSerializable
public function __construct()
{
$this->members = new \ArrayObject;
$this->labels = new \ArrayObject;
$this->slides = new ArrayCollection;
$this->backlogColumn = new KanbanColumn();
@@ -166,6 +173,24 @@ class Team implements JsonSerializable
return $this;
}
/**
* @return array
*/
public function getLabels()
{
return $this->labels;
}
/**
* @param array $labels
* @return Team
*/
public function setLabels(array $labels): Team
{
$this->labels = $labels;
return $this;
}
/**
* @param Slide $slide
* @return Team
@@ -353,6 +378,7 @@ class Team implements JsonSerializable
'id' => $this->getId(),
'name' => $this->getName(),
'members' => $this->getMembers(),
'labels' => $this->getLabels(),
'filterId' => $this->getFilterId(),
'backlogColumn' => $this->getBacklogColumn() ?? new KanbanColumn(),
'inprogressColumn' => $this->getInprogressColumn() ?? new KanbanColumn(),