|
|
@@ -186,6 +186,11 @@ class Tagg
|
|
|
#[ORM\ManyToMany(targetEntity: EducationCurriculumPack::class, mappedBy: 'tags', cascade: [], orphanRemoval: false)]
|
|
|
protected Collection $educationCurriculumPacks;
|
|
|
|
|
|
+ /** @var Collection<int, AbstractControl> */
|
|
|
+ #[ORM\OneToMany(targetEntity: AbstractControl::class, mappedBy: 'tags', cascade: [], orphanRemoval: false)]
|
|
|
+ private Collection $controls;
|
|
|
+
|
|
|
+
|
|
|
public function __construct()
|
|
|
{
|
|
|
$this->accesses = new ArrayCollection();
|
|
|
@@ -221,6 +226,7 @@ class Tagg
|
|
|
$this->repairs = new ArrayCollection();
|
|
|
$this->controls = new ArrayCollection();
|
|
|
$this->educationCurriculumPacks = new ArrayCollection();
|
|
|
+ $this->controls = new ArrayCollection();
|
|
|
}
|
|
|
|
|
|
public function getId(): ?int
|
|
|
@@ -1062,12 +1068,6 @@ class Tagg
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
- public function getControls(): Collection
|
|
|
- {
|
|
|
- return $this->controls;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
public function getEducationCurriculumPacks(): Collection
|
|
|
{
|
|
|
return $this->educationCurriculumPacks;
|
|
|
@@ -1091,4 +1091,28 @@ class Tagg
|
|
|
|
|
|
return $this;
|
|
|
}
|
|
|
+
|
|
|
+ public function getControls(): Collection
|
|
|
+ {
|
|
|
+ return $this->controls;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function addControl(AbstractControl $control): self
|
|
|
+ {
|
|
|
+ if (!$this->controls->contains($control)) {
|
|
|
+ $this->controls[] = $control;
|
|
|
+ $control->addTag($this);
|
|
|
+ }
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function removeControl(AbstractControl $control): self
|
|
|
+ {
|
|
|
+ if ($this->controls->removeElement($control)) {
|
|
|
+ $control->removeTag($this);
|
|
|
+ }
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
}
|