2727use App \Entity \Parts \Footprint ;
2828use App \Entity \Parts \Part ;
2929use App \Services \Cache \ElementCacheTagGenerator ;
30+ use App \Services \EntityURLGenerator ;
3031use App \Services \Trees \NodesListBuilder ;
3132use Doctrine \ORM \EntityManagerInterface ;
3233use Symfony \Component \HttpKernel \Exception \NotFoundHttpException ;
@@ -44,6 +45,7 @@ public function __construct(
4445 private readonly EntityManagerInterface $ em ,
4546 private readonly ElementCacheTagGenerator $ tagGenerator ,
4647 private readonly UrlGeneratorInterface $ urlGenerator ,
48+ private readonly EntityURLGenerator $ entityURLGenerator ,
4749 private readonly TranslatorInterface $ translator ,
4850 /** The maximum level of the shown categories. 0 Means only the top level categories are shown. -1 means only a single one containing */
4951 private readonly int $ category_depth ,
@@ -108,6 +110,8 @@ public function getCategories(): array
108110 $ result [] = [
109111 'id ' => (string )$ category ->getId (),
110112 'name ' => $ category ->getFullPath ('/ ' ),
113+ //Show the category link as the category description, this also fixes an segfault in KiCad see issue #878
114+ 'description ' => $ this ->entityURLGenerator ->listPartsURL ($ category ),
111115 ];
112116 }
113117
0 commit comments