mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
PrivateCommentEmbeddable created and added to entities + datamapper
This commit is contained in:
@@ -14,6 +14,7 @@ namespace Chill\CalendarBundle\Entity;
|
||||
use Chill\ActivityBundle\Entity\Activity;
|
||||
use Chill\CalendarBundle\Repository\CalendarRepository;
|
||||
use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable;
|
||||
use Chill\MainBundle\Entity\Embeddable\PrivateCommentEmbeddable;
|
||||
use Chill\MainBundle\Entity\Location;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
@@ -71,10 +72,10 @@ class Calendar
|
||||
private CommentEmbeddable $comment;
|
||||
|
||||
/**
|
||||
* @ORM\Embedded(class=CommentEmbeddable::class, columnPrefix="prcomment_")
|
||||
* @ORM\Embedded(class=PrivateCommentEmbeddable::class, columnPrefix="privateComment_")
|
||||
* @Serializer\Groups({"calendar:read"})
|
||||
*/
|
||||
private CommentEmbeddable $privateComment;
|
||||
private PrivateCommentEmbeddable $privateComment;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetimetz_immutable")
|
||||
@@ -157,7 +158,7 @@ class Calendar
|
||||
public function __construct()
|
||||
{
|
||||
$this->comment = new CommentEmbeddable();
|
||||
$this->privateComment = new CommentEmbeddable();
|
||||
$this->privateComment = new PrivateCommentEmbeddable();
|
||||
$this->persons = new ArrayCollection();
|
||||
$this->professionals = new ArrayCollection();
|
||||
$this->invites = new ArrayCollection();
|
||||
@@ -215,7 +216,7 @@ class Calendar
|
||||
return $this->comment;
|
||||
}
|
||||
|
||||
public function getPrivateComment(): CommentEmbeddable
|
||||
public function getPrivateComment(): PrivateCommentEmbeddable
|
||||
{
|
||||
return $this->privateComment;
|
||||
}
|
||||
@@ -398,7 +399,7 @@ class Calendar
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setPrivateComment(CommentEmbeddable $privateComment): self
|
||||
public function setPrivateComment(PrivateCommentEmbeddable $privateComment): self
|
||||
{
|
||||
$this->privateComment = $privateComment;
|
||||
|
||||
|
Reference in New Issue
Block a user