PrivateCommentEmbeddable created and added to entities + datamapper

This commit is contained in:
2022-04-26 20:21:33 +02:00
parent 64b5de2c03
commit 37a198b860
8 changed files with 167 additions and 32 deletions

View File

@@ -15,6 +15,7 @@ use Chill\ActivityBundle\Validator\Constraints as ActivityValidator;
use Chill\DocStoreBundle\Entity\StoredObject;
use Chill\MainBundle\Entity\Center;
use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable;
use Chill\MainBundle\Entity\Embeddable\PrivateCommentEmbeddable;
use Chill\MainBundle\Entity\HasCenterInterface;
use Chill\MainBundle\Entity\HasScopeInterface;
use Chill\MainBundle\Entity\Location;
@@ -86,10 +87,10 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
private CommentEmbeddable $comment;
/**
* @ORM\Embedded(class="Chill\MainBundle\Entity\Embeddable\CommentEmbeddable", columnPrefix="prcomment_")
* @ORM\Embedded(class="Chill\MainBundle\Entity\Embeddable\PrivateCommentEmbeddable", columnPrefix="privateComment_")
* @Groups({"docgen:read"})
*/
private CommentEmbeddable $privateComment;
private PrivateCommentEmbeddable $privateComment;
/**
* @ORM\Column(type="datetime")
@@ -197,7 +198,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
{
$this->reasons = new ArrayCollection();
$this->comment = new CommentEmbeddable();
$this->privateComment = new CommentEmbeddable();
$this->privateComment = new PrivateCommentEmbeddable();
$this->persons = new ArrayCollection();
$this->thirdParties = new ArrayCollection();
$this->documents = new ArrayCollection();
@@ -307,7 +308,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
return $this->comment;
}
public function getPrivateComment(): CommentEmbeddable
public function getPrivateComment(): PrivateCommentEmbeddable
{
return $this->privateComment;
}
@@ -536,7 +537,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
return $this;
}
public function setPrivateComment(CommentEmbeddable $privateComment): self
public function setPrivateComment(PrivateCommentEmbeddable $privateComment): self
{
$this->privateComment = $privateComment;