This commit is contained in:
2021-12-13 22:57:50 +01:00
parent f2fd30b690
commit f9dd1c5231
5 changed files with 80 additions and 64 deletions

View File

@@ -71,6 +71,11 @@ class SocialAction
*/
private $issue;
/**
* @ORM\Column(type="float", name="ordering", options={"default": 0.0})
*/
private float $ordering = 0.0;
/**
* @ORM\ManyToOne(targetEntity=SocialAction::class, inversedBy="children")
*/
@@ -87,11 +92,6 @@ class SocialAction
*/
private $title = [];
/**
* @ORM\Column(type="float", name="ordering", options={"default": 0.0})
*/
private float $ordering = 0.0;
public function __construct()
{
$this->children = new ArrayCollection();
@@ -100,17 +100,6 @@ class SocialAction
$this->evaluations = new ArrayCollection();
}
public function getOrdering(): float
{
return $this->ordering;
}
public function setOrdering(float $ordering): SocialAction
{
$this->ordering = $ordering;
return $this;
}
public function addChild(self $child): self
{
if (!$this->children->contains($child)) {
@@ -216,6 +205,11 @@ class SocialAction
return $this->issue;
}
public function getOrdering(): float
{
return $this->ordering;
}
public function getParent(): ?self
{
return $this->parent;
@@ -290,6 +284,13 @@ class SocialAction
return $this;
}
public function setOrdering(float $ordering): SocialAction
{
$this->ordering = $ordering;
return $this;
}
/**
* @internal use $parent->addChild() instead (@see{self::addChild()})
*/