mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
Issue336 internal create action fixes
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user