Added a basic admin page for footprints.

This commit is contained in:
Jan Böhmer 2019-04-28 13:08:06 +02:00
parent defd169737
commit 2ea0dc16e0
4 changed files with 131 additions and 0 deletions

View file

@ -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!');
}