websocket init
This commit is contained in:
@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
|
||||
@ -85,6 +87,16 @@ class Scrumissue
|
||||
*/
|
||||
private $scrumsprint;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="Userpoker", mappedBy="scrumissue", cascade={"persist"}, orphanRemoval=true)
|
||||
*/
|
||||
private $userpokers;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->userpokers = new ArrayCollection();
|
||||
}
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
@ -234,6 +246,37 @@ class Scrumissue
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection|Userpoker[]
|
||||
*/
|
||||
public function getUserpokers(): Collection
|
||||
{
|
||||
return $this->userpokers;
|
||||
}
|
||||
|
||||
public function addUserpoker(Userpoker $userpoker): self
|
||||
{
|
||||
if (!$this->userpokers->contains($userpoker)) {
|
||||
$this->userpokers[] = $userpoker;
|
||||
$userpoker->setScrumissue($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeUserpoker(Userpoker $userpoker): self
|
||||
{
|
||||
if ($this->userpokers->contains($userpoker)) {
|
||||
$this->userpokers->removeElement($userpoker);
|
||||
// set the owning side to null (unless already changed)
|
||||
if ($userpoker->getScrumissue() === $this) {
|
||||
$userpoker->setScrumissue(null);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user