Toevoeging van meer responses op messages
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
|
||||
namespace App\Game\Repository;
|
||||
|
||||
use App\Game\Entity\Game;
|
||||
use App\Game\Entity\GameSetting;
|
||||
use App\Game\Enum\GameSettingType;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
@@ -15,4 +17,12 @@ class GameSettingRepository extends ServiceEntityRepository
|
||||
{
|
||||
parent::__construct($registry, GameSetting::class);
|
||||
}
|
||||
|
||||
public function getSetting(Game $game, GameSettingType $name): ?GameSetting
|
||||
{
|
||||
return $this->findOneBy([
|
||||
'game' => $game,
|
||||
'name' => $name,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user