26 lines
642 B
PHP
26 lines
642 B
PHP
<?php
|
|
|
|
namespace App\Controller;
|
|
|
|
use App\Core\Controller\Site\PageController;
|
|
use App\Entity\Debriefing;
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
|
|
class DebriefingController extends PageController
|
|
{
|
|
public function debriefing(Debriefing $entity, \DateTime $date): Response
|
|
{
|
|
if (!$this->siteRequest->getPage()) {
|
|
throw $this->createNotFoundException();
|
|
}
|
|
|
|
if ($entity->getDate() != $date) {
|
|
throw $this->createNotFoundException();
|
|
}
|
|
|
|
return $this->defaultRender($this->siteRequest->getPage()->getTemplate(), [
|
|
'entity' => $entity,
|
|
]);
|
|
}
|
|
}
|