mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-05 23:15:50 +01:00
Added a basic admin page for footprints.
This commit is contained in:
@@ -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!');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user