Adds share feature
This commit is contained in:
parent
287c1f67c5
commit
15a9dcf09b
14 changed files with 379 additions and 23 deletions
|
@ -3,6 +3,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace GamesShop\Entities;
|
||||
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use GamesShop\Entities\Account\User;
|
||||
|
@ -35,6 +36,7 @@ final class GamesList
|
|||
{
|
||||
$this->owner = $owner;
|
||||
$this->name = $name;
|
||||
$this->claimer = new ArrayCollection([$owner]);
|
||||
}
|
||||
|
||||
|
||||
|
@ -53,10 +55,13 @@ final class GamesList
|
|||
return $this->name;
|
||||
}
|
||||
|
||||
public function getClaimer(): array
|
||||
public function getClaimer(): Collection
|
||||
{
|
||||
return $this->claimer;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function addClaimer(User $claimer): void
|
||||
{
|
||||
$this->claimer[] = $claimer;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue