added event to extend detail pages (#3209)
This commit is contained in:
@@ -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
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user