Finished builtin footprints viewer tool.

This commit is contained in:
Jan Böhmer 2023-01-09 23:40:54 +01:00
parent f84d1f8a8f
commit 04b660d777
7 changed files with 39 additions and 10 deletions

View file

@ -90,12 +90,14 @@ class ToolsController extends AbstractController
}
/**
* @Route("/builtin_footprints")
* @Route("/builtin_footprints", name="tools_builtin_footprints_viewer")
* @param AttachmentPathResolver $pathResolver
* @return Response
*/
public function builtInFootprintsViewer(BuiltinAttachmentsFinder $builtinAttachmentsFinder, AttachmentURLGenerator $urlGenerator, ): Response
{
$this->denyAccessUnlessGranted('@tools.builtin_footprints_viewer');
$grouped_footprints = $builtinAttachmentsFinder->getListOfFootprintsGroupedByFolder();
$grouped_footprints = array_map(function($group) use ($urlGenerator) {
return array_map(function($placeholder_filepath) use ($urlGenerator) {