mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-15 14:46:04 +02:00
Implemented Members attribut and optimized membership
This commit is contained in:
33
application/src/Entity/Attribut/MembersAttribut.php
Normal file
33
application/src/Entity/Attribut/MembersAttribut.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use App\Entity\Source\SourceInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
trait MembersAttribut
|
||||
{
|
||||
/**
|
||||
* @var Collection|SourceInterface[]
|
||||
*/
|
||||
protected $memberships;
|
||||
|
||||
/**
|
||||
* @return Collection|SourceInterface[]
|
||||
*/
|
||||
public function getMembers(): Collection
|
||||
{
|
||||
return $this->memberships;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection|SourceInterface[] $members
|
||||
*/
|
||||
public function setMembers(Collection $members): void
|
||||
{
|
||||
$this->memberships = $members;
|
||||
}
|
||||
}
|
22
application/src/Entity/Attribut/MembersAttributInterface.php
Normal file
22
application/src/Entity/Attribut/MembersAttributInterface.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use App\Entity\Source\SourceInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface MembersAttributInterface
|
||||
{
|
||||
/**
|
||||
* @param Collection|SourceInterface[] $members
|
||||
*/
|
||||
public function setMembers(Collection $members): void;
|
||||
|
||||
/**
|
||||
* @return Collection|SourceInterface[]
|
||||
*/
|
||||
public function getMembers(): Collection;
|
||||
}
|
@@ -3,7 +3,7 @@
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use App\Entity\Source\Complex\Collection\TreeCollectionSourceInterface;
|
||||
use App\Entity\Source\SourceInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
@@ -11,12 +11,12 @@ use App\Entity\Source\Complex\Collection\TreeCollectionSourceInterface;
|
||||
trait MembershipsAttribut
|
||||
{
|
||||
/**
|
||||
* @var Collection|TreeCollectionSourceInterface[]
|
||||
* @var Collection|SourceInterface[]
|
||||
*/
|
||||
protected $memberships;
|
||||
|
||||
/**
|
||||
* @return Collection|TreeCollectionSourceInterface[]
|
||||
* @return Collection|SourceInterface[]
|
||||
*/
|
||||
public function getMemberships(): Collection
|
||||
{
|
||||
@@ -24,7 +24,7 @@ trait MembershipsAttribut
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection|TreeCollectionSourceInterface[] $memberships
|
||||
* @param Collection|SourceInterface[] $memberships
|
||||
*/
|
||||
public function setMemberships(Collection $memberships): void
|
||||
{
|
||||
|
@@ -3,7 +3,7 @@
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use App\Entity\Source\Complex\Collection\TreeCollectionSourceInterface;
|
||||
use App\Entity\Source\SourceInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
@@ -11,12 +11,12 @@ use App\Entity\Source\Complex\Collection\TreeCollectionSourceInterface;
|
||||
interface MembershipsAttributInterface
|
||||
{
|
||||
/**
|
||||
* @param Collection|TreeCollectionSourceInterface[] $groups
|
||||
* @param Collection|SourceInterface[] $groups
|
||||
*/
|
||||
public function setMemberships(Collection $memberships): void;
|
||||
|
||||
/**
|
||||
* @return Collection|TreeCollectionSourceInterface[]
|
||||
* @return Collection|SourceInterface[]
|
||||
*/
|
||||
public function getMemberships(): Collection;
|
||||
}
|
||||
|
Reference in New Issue
Block a user