27
27
use App \Entity \Parts \Footprint ;
28
28
use App \Entity \Parts \Part ;
29
29
use App \Services \Cache \ElementCacheTagGenerator ;
30
+ use App \Services \EntityURLGenerator ;
30
31
use App \Services \Trees \NodesListBuilder ;
31
32
use Doctrine \ORM \EntityManagerInterface ;
32
33
use Symfony \Component \HttpKernel \Exception \NotFoundHttpException ;
@@ -44,6 +45,7 @@ public function __construct(
44
45
private readonly EntityManagerInterface $ em ,
45
46
private readonly ElementCacheTagGenerator $ tagGenerator ,
46
47
private readonly UrlGeneratorInterface $ urlGenerator ,
48
+ private readonly EntityURLGenerator $ entityURLGenerator ,
47
49
private readonly TranslatorInterface $ translator ,
48
50
/** The maximum level of the shown categories. 0 Means only the top level categories are shown. -1 means only a single one containing */
49
51
private readonly int $ category_depth ,
@@ -108,6 +110,8 @@ public function getCategories(): array
108
110
$ result [] = [
109
111
'id ' => (string )$ category ->getId (),
110
112
'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 ),
111
115
];
112
116
}
113
117
0 commit comments