mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 18:43:49 +00:00
Create internal and external animators
This commit is contained in:
@@ -63,13 +63,17 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
|
||||
/**
|
||||
* @var Collection<int, User>
|
||||
*/
|
||||
#[ORM\OneToMany(mappedBy: 'event', targetEntity: User::class)]
|
||||
#[ORM\ManyToMany(targetEntity: User::class)]
|
||||
#[Serializer\Groups(['read'])]
|
||||
#[ORM\JoinTable('chill_event_animatorsintern')]
|
||||
private Collection $animatorsIntern;
|
||||
|
||||
/**
|
||||
* @var Collection<int, ThirdParty>
|
||||
*/
|
||||
#[ORM\OneToMany(mappedBy: 'event', targetEntity: ThirdParty::class)]
|
||||
#[ORM\ManyToMany(targetEntity: ThirdParty::class)]
|
||||
#[Serializer\Groups(['read'])]
|
||||
#[ORM\JoinTable('chill_event_animatorsextern')]
|
||||
private Collection $animatorsExtern;
|
||||
|
||||
#[Assert\NotBlank]
|
||||
@@ -204,26 +208,26 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
|
||||
return $this->animatorsExtern;
|
||||
}
|
||||
|
||||
public function addAnimatorIntern(User $ai): self
|
||||
public function addAnimatorsIntern(User $ai): self
|
||||
{
|
||||
$this->animatorsIntern->add($ai);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeAnimatorIntern(User $ai): void
|
||||
public function removeAnimatorsIntern(User $ai): void
|
||||
{
|
||||
$this->animatorsIntern->removeElement($ai);
|
||||
}
|
||||
|
||||
public function addAnimatorExtern(User $ae): self
|
||||
public function addAnimatorsExtern(ThirdParty $ae): self
|
||||
{
|
||||
$this->animatorsExtern->add($ae);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeAnimatorExtern(User $ae): void
|
||||
public function removeAnimatorsExtern(ThirdParty $ae): void
|
||||
{
|
||||
$this->animatorsExtern->removeElement($ae);
|
||||
}
|
||||
|
Reference in New Issue
Block a user