* mostly complete
This commit is contained in:
43
src/App/Service/AwardeeManager.php
Normal file
43
src/App/Service/AwardeeManager.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service;
|
||||
|
||||
use App\Entity\Awardee;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
|
||||
class AwardeeManager
|
||||
{
|
||||
/** @var EntityManager */
|
||||
private $entityManager;
|
||||
|
||||
public function __construct(EntityManager $entityManager)
|
||||
{
|
||||
$this->entityManager = $entityManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $year
|
||||
* @return Awardee[]
|
||||
*/
|
||||
public function getJudgesByYear(int $year): ?array
|
||||
{
|
||||
return $this->entityManager->getRepository(Awardee::class)->findBy([
|
||||
'year' => $year,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $slug
|
||||
* @return Awardee|null
|
||||
*/
|
||||
public function getJudgeFromSlug(string $slug): ?Awardee
|
||||
{
|
||||
/** @var Awardee $awardee */
|
||||
$awardee = $this->entityManager->getRepository(Awardee::class)->findOneBy([
|
||||
'slug' => $slug,
|
||||
]);
|
||||
return $awardee;
|
||||
}
|
||||
}
|
||||
17
src/App/Service/AwardeeManagerFactory.php
Normal file
17
src/App/Service/AwardeeManagerFactory.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service;
|
||||
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Psr\Container\ContainerInterface;
|
||||
|
||||
class AwardeeManagerFactory
|
||||
{
|
||||
public function __invoke(ContainerInterface $container) : AwardeeManager
|
||||
{
|
||||
$entityManager = $container->get(EntityManager::class);
|
||||
return new AwardeeManager($entityManager);
|
||||
}
|
||||
}
|
||||
121
src/App/Service/JudgeManager.php
Normal file
121
src/App/Service/JudgeManager.php
Normal file
@@ -0,0 +1,121 @@
|
||||
<?php
|
||||
|
||||
namespace App\Service;
|
||||
|
||||
class JudgeManager
|
||||
{
|
||||
public function getJudges()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'image' => 'agnes_soos',
|
||||
'name' => 'Dr Ágnes Soós',
|
||||
'desc' => 'National Institute for Sports Medicine, Director General',
|
||||
], [
|
||||
'image' => 'balazs_nagy_lantos',
|
||||
'name' => 'Balázs Nagy Lantos',
|
||||
'desc' => 'Mensa HungarIQa,Former President',
|
||||
], [
|
||||
'image' => 'bertalan_mesko',
|
||||
'name' => 'Dr Bertalan Meskó',
|
||||
'desc' => 'Winner of GRAN PRIZE 2013, medical futurist, founder of Webicina',
|
||||
], [
|
||||
'image' => 'edit_nemeth',
|
||||
'name' => 'Dr Edit Németh',
|
||||
'desc' => 'ELTE Institute of Business Economics, Management and Business Law Faculty',
|
||||
], [
|
||||
'image' => 'erno_keszei',
|
||||
'name' => 'Prof. Ernő Keszei',
|
||||
'desc' => 'Eötvös Loránd University, Former Vice-Rector for Science, Research, and Innovation',
|
||||
], [
|
||||
'image' => 'gabor_kopek',
|
||||
'name' => 'Gábor Kopek',
|
||||
'desc' => 'Moholy-Nagy University of Art and Design Budapest, Former Rector',
|
||||
], [
|
||||
'image' => 'gabor_nemeth',
|
||||
'name' => 'Dr Gábor Németh',
|
||||
'desc' => 'Hungarian Intellectual Property Office, Director',
|
||||
], [
|
||||
'image' => 'gabor_szabo',
|
||||
'name' => 'Dr Gábor Szabó',
|
||||
'desc' => 'University of Szeged, Rector; Hungarian Association for Innovation, President',
|
||||
], [
|
||||
'image' => 'gyorgy_nagy',
|
||||
'name' => 'György Nagy',
|
||||
'desc' => 'Sigma Technology, Managing Director; Swedish Chamber of Commerce in Hungary, Vice-President',
|
||||
], [
|
||||
'image' => 'gyula_patko',
|
||||
'name' => 'Dr Gyula Patkó',
|
||||
'desc' => 'University of Miskolc, Former Rector',
|
||||
], [
|
||||
'image' => 'ildiko_csejtei',
|
||||
'name' => 'Ildikó B. Csejtei',
|
||||
'desc' => 'Independent Media Group, Owner, Director',
|
||||
], [
|
||||
'image' => 'istvan_salgo',
|
||||
'name' => 'István Salgó',
|
||||
'desc' => 'Business Council for Sustainable Development in Hungary, Honorary President',
|
||||
], [
|
||||
'image' => 'janos_durr',
|
||||
'name' => 'János Dürr',
|
||||
'desc' => 'Club of Hungarian Science Journalists, President',
|
||||
], [
|
||||
'image' => 'janos_takacs',
|
||||
'name' => 'János Takács',
|
||||
'desc' => 'Swedish Chamber of Commerce, President',
|
||||
], [
|
||||
'image' => 'jozsef_fulop',
|
||||
'name' => 'József Fülöp',
|
||||
'desc' => 'Moholy-Nagy University of Art and Design Budapest, Rector',
|
||||
], [
|
||||
'image' => 'jozsef_peter_martin',
|
||||
'name' => 'Dr József Péter Martin',
|
||||
'desc' => 'Transparency International Hungary, Managing Director',
|
||||
], [
|
||||
'image' => 'maria_judit_molnar',
|
||||
'name' => 'Dr Mária Judit Molnár',
|
||||
'desc' => 'SOTE Institute of Genomic Medicine and Rare Disorders, Head of the Institute',
|
||||
], [
|
||||
'image' => 'melinda_kamasz',
|
||||
'name' => 'Melinda Kamasz',
|
||||
'desc' => 'Figyelő, Deputy Editor in Chief, Figyelő Trend, Editor in Chief',
|
||||
], [
|
||||
'image' => 'miklos_antalovits',
|
||||
'name' => 'Dr Miklós Antalovits',
|
||||
'desc' => 'Budapest University of Technology and Economics, Professor Emeritus',
|
||||
], [
|
||||
'image' => 'miklos_bendzsel',
|
||||
'name' => 'Dr Miklós Bendzsel',
|
||||
'desc' => 'Hungarian Academy of Engineers, Vice-President; Hungarian Intellectual Property Office, Former President',
|
||||
], [
|
||||
'image' => 'peter_szauer',
|
||||
'name' => 'Péter Szauer',
|
||||
'desc' => 'HVG, President and Chief Executive Officer',
|
||||
], [
|
||||
'image' => 'richard_bogdan',
|
||||
'name' => 'Richárd Bogdán',
|
||||
'desc' => 'Mensa HungarIQa, President',
|
||||
], [
|
||||
'image' => 'rita_istivan',
|
||||
'name' => 'Rita Istiván',
|
||||
'desc' => 'BME, Honorary Associate Professor; Swedish Chamber of Commerce, Secretary General',
|
||||
], [
|
||||
'image' => 'roland_jakab',
|
||||
'name' => 'Roland Jakab',
|
||||
'desc' => 'Ericsson Hungary, Managing Director; Swedish Chamber of Commerce, Member of the Board',
|
||||
], [
|
||||
'image' => 'szabolcs_farkas',
|
||||
'name' => 'Dr Szabolcs Farkas',
|
||||
'desc' => 'Hungarian Intellectual Property Office, Vice-President',
|
||||
], [
|
||||
'image' => 'zoltan_bruckner',
|
||||
'name' => 'Zoltán Bruckner',
|
||||
'desc' => 'Primus Capital Management, Investment Director, Managing Partner',
|
||||
// ], [
|
||||
// 'image' => '',
|
||||
// 'name' => 'Dr Viktor Łuszcz',
|
||||
// 'desc' => 'Hungarian Intellectual Property Office, President',
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user