mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 18:43:49 +00:00
WIP change animator field to animator intern and animator extern
This commit is contained in:
@@ -61,10 +61,16 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
|
||||
private ?User $moderator = null;
|
||||
|
||||
/**
|
||||
* @var Collection<int, Animator>
|
||||
* @var Collection<int, User>
|
||||
*/
|
||||
#[ORM\OneToMany(mappedBy: 'event', targetEntity: Animator::class)]
|
||||
private Collection $animators;
|
||||
#[ORM\OneToMany(mappedBy: 'event', targetEntity: User::class)]
|
||||
private Collection $animatorsIntern;
|
||||
|
||||
/**
|
||||
* @var Collection<int, ThirdParty>
|
||||
*/
|
||||
#[ORM\OneToMany(mappedBy: 'event', targetEntity: ThirdParty::class)]
|
||||
private Collection $animatorsExtern;
|
||||
|
||||
#[Assert\NotBlank]
|
||||
#[Serializer\Groups(['read'])]
|
||||
@@ -129,7 +135,8 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
|
||||
$this->comment = new CommentEmbeddable();
|
||||
$this->themes = new ArrayCollection();
|
||||
$this->budgetElements = new ArrayCollection();
|
||||
$this->animators = new ArrayCollection();
|
||||
$this->animatorsIntern = new ArrayCollection();
|
||||
$this->animatorsExtern = new ArrayCollection();
|
||||
}
|
||||
|
||||
public function addBudgetElement(EventBudgetElement $budgetElement)
|
||||
@@ -187,21 +194,38 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
|
||||
$this->themes->removeElement($theme);
|
||||
}
|
||||
|
||||
public function getAnimators(): Collection
|
||||
public function getAnimatorsIntern(): Collection
|
||||
{
|
||||
return $this->animators;
|
||||
return $this->animatorsIntern;
|
||||
}
|
||||
|
||||
public function addAnimator(ThirdParty|User $a): self
|
||||
public function getAnimatorsExtern(): Collection
|
||||
{
|
||||
$this->animators->add($a);
|
||||
return $this->animatorsExtern;
|
||||
}
|
||||
|
||||
public function addAnimatorIntern(User $ai): self
|
||||
{
|
||||
$this->animatorsIntern->add($ai);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeAnimator(ThirdParty|User $a): void
|
||||
public function removeAnimatorIntern(User $ai): void
|
||||
{
|
||||
$this->animators->removeElement($a);
|
||||
$this->animatorsIntern->removeElement($ai);
|
||||
}
|
||||
|
||||
public function addAnimatorExtern(User $ae): self
|
||||
{
|
||||
$this->animatorsExtern->add($ae);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeAnimatorExtern(User $ae): void
|
||||
{
|
||||
$this->animatorsExtern->removeElement($ae);
|
||||
}
|
||||
|
||||
public function getCenter(): Center
|
||||
|
Reference in New Issue
Block a user