create first working communication
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace Mine\SeekerBundle\Entity;
|
||||
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Jotunheimr\UserBundle\Entity\User;
|
||||
|
||||
@@ -23,10 +24,17 @@ class PlayedGame
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="game_assoc", type="string", length=50, nullable=false)
|
||||
*/
|
||||
private $gameAssoc;
|
||||
|
||||
/**
|
||||
* @var Grid
|
||||
*
|
||||
* @ORM\OneToOne(targetEntity="Mine\SeekerBundle\Entity\Grid", mappedBy="playedGame")
|
||||
* @ORM\OneToOne(targetEntity="Mine\SeekerBundle\Entity\Grid", mappedBy="playedGame", cascade={"persist"})
|
||||
*/
|
||||
private $grid;
|
||||
|
||||
@@ -94,19 +102,11 @@ class PlayedGame
|
||||
* @var Step
|
||||
*
|
||||
* @ORM\OneToMany(targetEntity="Mine\SeekerBundle\Entity\Step", mappedBy="playedGame")
|
||||
* @ORM\JoinColumn(name="step", referencedColumnName="id", nullable=true)
|
||||
*/
|
||||
private $step;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
@@ -115,6 +115,16 @@ class PlayedGame
|
||||
$this->step = new ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set redPoints
|
||||
*
|
||||
@@ -259,64 +269,6 @@ class PlayedGame
|
||||
return $this->red;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set blue
|
||||
*
|
||||
* @param User $blue
|
||||
*
|
||||
* @return PlayedGame
|
||||
*/
|
||||
public function setBlue(User $blue = null)
|
||||
{
|
||||
$this->blue = $blue;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get blue
|
||||
*
|
||||
* @return User
|
||||
*/
|
||||
public function getBlue()
|
||||
{
|
||||
return $this->blue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add step
|
||||
*
|
||||
* @param \Mine\SeekerBundle\Entity\Step $step
|
||||
*
|
||||
* @return PlayedGame
|
||||
*/
|
||||
public function addStep(\Mine\SeekerBundle\Entity\Step $step)
|
||||
{
|
||||
$this->step[] = $step;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove step
|
||||
*
|
||||
* @param \Mine\SeekerBundle\Entity\Step $step
|
||||
*/
|
||||
public function removeStep(\Mine\SeekerBundle\Entity\Step $step)
|
||||
{
|
||||
$this->step->removeElement($step);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get step
|
||||
*
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getStep()
|
||||
{
|
||||
return $this->step;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set redAnon
|
||||
*
|
||||
@@ -341,6 +293,30 @@ class PlayedGame
|
||||
return $this->redAnon;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set blue
|
||||
*
|
||||
* @param User $blue
|
||||
*
|
||||
* @return PlayedGame
|
||||
*/
|
||||
public function setBlue(User $blue = null)
|
||||
{
|
||||
$this->blue = $blue;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get blue
|
||||
*
|
||||
* @return User
|
||||
*/
|
||||
public function getBlue()
|
||||
{
|
||||
return $this->blue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set blueAnon
|
||||
*
|
||||
@@ -364,4 +340,62 @@ class PlayedGame
|
||||
{
|
||||
return $this->blueAnon;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add step
|
||||
*
|
||||
* @param Step $step
|
||||
*
|
||||
* @return PlayedGame
|
||||
*/
|
||||
public function addStep(Step $step)
|
||||
{
|
||||
$this->step[] = $step;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove step
|
||||
*
|
||||
* @param Step $step
|
||||
*/
|
||||
public function removeStep(Step $step)
|
||||
{
|
||||
$this->step->removeElement($step);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get step
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getStep()
|
||||
{
|
||||
return $this->step;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set gameAssoc
|
||||
*
|
||||
* @param string $gameAssoc
|
||||
*
|
||||
* @return PlayedGame
|
||||
*/
|
||||
public function setGameAssoc($gameAssoc)
|
||||
{
|
||||
$this->gameAssoc = $gameAssoc;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get gameAssoc
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getGameAssoc()
|
||||
{
|
||||
return $this->gameAssoc;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user