mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 18:43:49 +00:00
WIP change animator field
This commit is contained in:
@@ -61,11 +61,9 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
|
||||
private ?User $moderator = null;
|
||||
|
||||
/**
|
||||
* @var Collection<int, ThirdParty>
|
||||
* @var Collection<int, Animator>
|
||||
*/
|
||||
#[ORM\ManyToMany(targetEntity: ThirdParty::class)]
|
||||
#[Serializer\Groups(['read'])]
|
||||
#[ORM\JoinTable('chill_event_thirdparty')]
|
||||
#[ORM\OneToMany(mappedBy: 'event', targetEntity: Animator::class)]
|
||||
private Collection $animators;
|
||||
|
||||
#[Assert\NotBlank]
|
||||
@@ -194,16 +192,16 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
|
||||
return $this->animators;
|
||||
}
|
||||
|
||||
public function addAnimator(ThirdParty $tp): self
|
||||
public function addAnimator(ThirdParty|User $a): self
|
||||
{
|
||||
$this->animators->add($tp);
|
||||
$this->animators->add($a);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeAnimator(ThirdParty $tp): void
|
||||
public function removeAnimator(ThirdParty|User $a): void
|
||||
{
|
||||
$this->animators->removeElement($tp);
|
||||
$this->animators->removeElement($a);
|
||||
}
|
||||
|
||||
public function getCenter(): Center
|
||||
|
Reference in New Issue
Block a user