Issue336 internal create action fixes

This commit is contained in:
2021-12-14 18:48:31 +00:00
committed by Julien Fastré
parent 45bcb27b79
commit 264bd76461
14 changed files with 154 additions and 146 deletions

View File

@@ -180,14 +180,6 @@ class AccompanyingPeriod implements
*/
private ?int $id = null;
/**
* @ORM\ManyToOne(
* targetEntity=Comment::class
* )
* @Groups({"read"})
*/
private ?Comment $pinnedComment = null;
/**
* @var string
* @ORM\Column(type="string", nullable=true)
@@ -229,6 +221,14 @@ class AccompanyingPeriod implements
*/
private ?Person $personLocation = null;
/**
* @ORM\ManyToOne(
* targetEntity=Comment::class
* )
* @Groups({"read"})
*/
private ?Comment $pinnedComment = null;
/**
* @ORM\Column(type="text")
* @Groups({"read", "write"})
@@ -603,14 +603,6 @@ class AccompanyingPeriod implements
return $this->id;
}
/**
* @Groups({"read"})
*/
public function getPinnedComment(): ?Comment
{
return $this->pinnedComment;
}
public function getIntensity(): ?string
{
return $this->intensity;
@@ -738,6 +730,14 @@ class AccompanyingPeriod implements
);
}
/**
* @Groups({"read"})
*/
public function getPinnedComment(): ?Comment
{
return $this->pinnedComment;
}
/**
* @return Collection|SocialAction[] All the descendant social actions of all
* the descendants of the entity
@@ -1027,24 +1027,6 @@ class AccompanyingPeriod implements
return $this;
}
/**
* @Groups({"write"})
*/
public function setPinnedComment(?Comment $comment = null): self
{
if (null !== $this->pinnedComment) {
$this->removeComment($this->pinnedComment);
}
if ($comment instanceof Comment) {
$this->addComment($comment);
}
$this->pinnedComment = $comment;
return $this;
}
public function setIntensity(string $intensity): self
{
$this->intensity = $intensity;
@@ -1083,6 +1065,24 @@ class AccompanyingPeriod implements
return $this;
}
/**
* @Groups({"write"})
*/
public function setPinnedComment(?Comment $comment = null): self
{
if (null !== $this->pinnedComment) {
$this->removeComment($this->pinnedComment);
}
if ($comment instanceof Comment) {
$this->addComment($comment);
}
$this->pinnedComment = $comment;
return $this;
}
public function setRemark(?string $remark = null): self
{
$this->remark = (string) $remark;