* initial api stuff
This commit is contained in:
@@ -17,6 +17,13 @@ class AwardeeManager
|
||||
$this->entityManager = $entityManager;
|
||||
}
|
||||
|
||||
public function getAwardees(): ?array
|
||||
{
|
||||
return $this->entityManager->getRepository(Awardee::class)->findBy([], [
|
||||
'year' => 'DESC',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $year
|
||||
* @return Awardee[]
|
||||
@@ -28,6 +35,13 @@ class AwardeeManager
|
||||
]);
|
||||
}
|
||||
|
||||
public function getAwardee(int $id): ?Awardee
|
||||
{
|
||||
/** @var Awardee $awardee */
|
||||
$awardee = $this->entityManager->getRepository(Awardee::class)->find($id);
|
||||
return $awardee;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $slug
|
||||
* @return Awardee|null
|
||||
|
||||
Reference in New Issue
Block a user