mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-22 01:49:05 +02:00
Added a basic admin page for footprints.
This commit is contained in:
parent
defd169737
commit
2ea0dc16e0
4 changed files with 131 additions and 0 deletions
|
@ -32,6 +32,7 @@ namespace App\Services;
|
|||
use App\Entity\AttachmentType;
|
||||
use App\Entity\Category;
|
||||
use App\Entity\Device;
|
||||
use App\Entity\Footprint;
|
||||
use App\Entity\Manufacturer;
|
||||
use App\Entity\NamedDBElement;
|
||||
use App\Entity\Part;
|
||||
|
@ -139,6 +140,10 @@ class EntityURLGenerator
|
|||
return $this->urlGenerator->generate("store_location_edit", ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
if ($entity instanceof Footprint) {
|
||||
return $this->urlGenerator->generate("footprint_edit", ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
//Otherwise throw an error
|
||||
throw new EntityNotSupported('The given entity is not supported yet!');
|
||||
}
|
||||
|
@ -180,6 +185,10 @@ class EntityURLGenerator
|
|||
return $this->urlGenerator->generate('store_location_new');
|
||||
}
|
||||
|
||||
if ($entity instanceof Footprint) {
|
||||
return $this->urlGenerator->generate('footprint_new');
|
||||
}
|
||||
|
||||
throw new EntityNotSupported('The given entity is not supported yet!');
|
||||
}
|
||||
|
||||
|
@ -242,6 +251,10 @@ class EntityURLGenerator
|
|||
return $this->urlGenerator->generate('store_location_new', ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
if ($entity instanceof Footprint) {
|
||||
return $this->urlGenerator->generate('footprint_new', ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
throw new EntityNotSupported('The given entity is not supported yet!');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue