added event to extend detail pages (#3209)

This commit is contained in:
Kevin Papst
2022-03-19 23:54:40 +01:00
committed by GitHub
parent a8ac6b2eda
commit 4b069edd33
12 changed files with 225 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ use App\Entity\ProjectComment;
use App\Entity\ProjectRate;
use App\Entity\Rate;
use App\Entity\Team;
use App\Event\ProjectDetailControllerEvent;
use App\Event\ProjectMetaDefinitionEvent;
use App\Event\ProjectMetaDisplayEvent;
use App\Export\Spreadsheet\EntityWithMetaFieldsExporter;
@@ -348,6 +349,11 @@ final class ProjectController extends AbstractController
$teams = $project->getTeams();
}
// additional boxes by plugins
$event = new ProjectDetailControllerEvent($project);
$this->dispatcher->dispatch($event);
$boxes = $event->getController();
return $this->render('project/details.html.twig', [
'project' => $project,
'comments' => $comments,
@@ -358,6 +364,7 @@ final class ProjectController extends AbstractController
'teams' => $teams,
'rates' => $rates,
'now' => $now,
'boxes' => $boxes
]);
}