Fixed exceptions on part info page

This commit is contained in:
Jan Böhmer 2019-08-15 22:34:37 +02:00
parent 1af7c37ad7
commit fd6961e2f3
4 changed files with 125 additions and 525 deletions

View file

@ -47,16 +47,13 @@ class PartController extends AbstractController
* @Route("/part/{id}/info", name="part_info")
* @Route("/part/{id}", requirements={"id"="\d+"})
*/
public function show(Part $part, AttachmentFilenameService $attachmentFilenameService, AttachmentHelper $attachmentHelper)
public function show(Part $part, AttachmentHelper $attachmentHelper)
{
$this->denyAccessUnlessGranted('read', $part);
$filename = $part->getMasterPictureFilename(true);
return $this->render('Parts/info/show_part_info.html.twig',
[
'part' => $part,
'main_image' => $attachmentFilenameService->attachmentPathToAbsolutePath($filename),
'attachment_helper' => $attachmentHelper
]
);