mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-13 10:49:32 +01:00
Allow to show parts for manufacturers and footprints.
This commit is contained in:
@@ -277,8 +277,17 @@ class EntityURLGenerator
|
||||
public function listPartsURL($entity) : string
|
||||
{
|
||||
if ($entity instanceof Category) {
|
||||
return $this->urlGenerator->generate('app_partlists_showcategory', ['id' => $entity->getID()]);
|
||||
return $this->urlGenerator->generate('part_list_category', ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
if ($entity instanceof Footprint) {
|
||||
return $this->urlGenerator->generate('part_list_footprint', ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
if ($entity instanceof Manufacturer) {
|
||||
return $this->urlGenerator->generate('part_list_manufacturer', ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
throw new EntityNotSupported('The given entity is not supported yet!');
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user