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

@@ -44,6 +44,11 @@ class SocialIssue
*/
private $id;
/**
* @ORM\Column(type="float", name="ordering", options={"default": 0.0})
*/
private float $ordering = 0.0;
/**
* @ORM\ManyToOne(targetEntity=SocialIssue::class, inversedBy="children")
*/
@@ -60,28 +65,12 @@ class SocialIssue
*/
private $title = [];
/**
* @ORM\Column(type="float", name="ordering", options={"default": 0.0})
*/
private float $ordering = 0.0;
public function __construct()
{
$this->children = new ArrayCollection();
$this->socialActions = new ArrayCollection();
}
public function getOrdering(): float
{
return $this->ordering;
}
public function setOrdering(float $ordering): SocialIssue
{
$this->ordering = $ordering;
return $this;
}
public function addChild(self $child): self
{
if (!$this->children->contains($child)) {
@@ -231,6 +220,11 @@ class SocialIssue
return $this->id;
}
public function getOrdering(): float
{
return $this->ordering;
}
public function getParent(): ?self
{
return $this->parent;
@@ -321,6 +315,13 @@ class SocialIssue
return $this;
}
public function setOrdering(float $ordering): SocialIssue
{
$this->ordering = $ordering;
return $this;
}
/**
* @internal use @see{SocialIssue::addChild()} instead
*/