|
@@ -7,6 +7,7 @@ use ApiPlatform\Core\Annotation\ApiResource;
|
|
|
use ApiPlatform\Core\Annotation\ApiSubresource;
|
|
use ApiPlatform\Core\Annotation\ApiSubresource;
|
|
|
use App\Entity\Organization\Organization;
|
|
use App\Entity\Organization\Organization;
|
|
|
use App\Entity\Organization\OrganizationLicence;
|
|
use App\Entity\Organization\OrganizationLicence;
|
|
|
|
|
+use App\Entity\Access\PersonalizedList;
|
|
|
use App\Repository\Access\AccessRepository;
|
|
use App\Repository\Access\AccessRepository;
|
|
|
use App\Entity\Person\Person;
|
|
use App\Entity\Person\Person;
|
|
|
use App\Entity\Person\PersonActivity;
|
|
use App\Entity\Person\PersonActivity;
|
|
@@ -105,6 +106,11 @@ class Access implements UserInterface
|
|
|
* @ORM\OneToMany(targetEntity=OrganizationLicence::class, mappedBy="licensee", orphanRemoval=true)
|
|
* @ORM\OneToMany(targetEntity=OrganizationLicence::class, mappedBy="licensee", orphanRemoval=true)
|
|
|
*/
|
|
*/
|
|
|
private $organizationLicences;
|
|
private $organizationLicences;
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @var ArrayCollection<PersonalizedList>
|
|
|
|
|
+ * @ORM\OneToMany(targetEntity=PersonalizedList::class, mappedBy="access", orphanRemoval=true)
|
|
|
|
|
+ */
|
|
|
|
|
+ private $personalizedLists;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* @var ArrayCollection<Access>
|
|
* @var ArrayCollection<Access>
|
|
@@ -126,6 +132,7 @@ class Access implements UserInterface
|
|
|
$this->personActivity = new ArrayCollection();
|
|
$this->personActivity = new ArrayCollection();
|
|
|
$this->organizationFunction = new ArrayCollection();
|
|
$this->organizationFunction = new ArrayCollection();
|
|
|
$this->organizationLicences = new ArrayCollection();
|
|
$this->organizationLicences = new ArrayCollection();
|
|
|
|
|
+ $this->personalizedLists = new ArrayCollection();
|
|
|
$this->guardians = new ArrayCollection();
|
|
$this->guardians = new ArrayCollection();
|
|
|
$this->children = new ArrayCollection();
|
|
$this->children = new ArrayCollection();
|
|
|
}
|
|
}
|
|
@@ -359,6 +366,36 @@ class Access implements UserInterface
|
|
|
return $this;
|
|
return $this;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @return Collection|PersonalizedList[]
|
|
|
|
|
+ */
|
|
|
|
|
+ public function getPersonalizedLists(): Collection
|
|
|
|
|
+ {
|
|
|
|
|
+ return $this->personalizedLists;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public function addPersonalizedList(PersonalizedList $personalizedList): self
|
|
|
|
|
+ {
|
|
|
|
|
+ if (!$this->personalizedLists->contains($personalizedList)) {
|
|
|
|
|
+ $this->personalizedLists[] = $personalizedList;
|
|
|
|
|
+ $personalizedList->setAccess($this);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public function removePersonalizedList(PersonalizedList $personalizedList): self
|
|
|
|
|
+ {
|
|
|
|
|
+ if ($this->personalizedLists->removeElement($personalizedList)) {
|
|
|
|
|
+ // set the owning side to null (unless already changed)
|
|
|
|
|
+ if ($personalizedList->getAccess() === $this) {
|
|
|
|
|
+ $personalizedList->setAccess(null);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* @return Collection|Access[]
|
|
* @return Collection|Access[]
|
|
|
*/
|
|
*/
|