mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 18:28:49 +02:00
Allow to show parts for manufacturers and footprints.
This commit is contained in:
parent
8dc9c7b9ae
commit
c3fd325645
10 changed files with 126 additions and 46 deletions
|
@ -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!');
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue