mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-05 23:15:50 +01:00
Added a admin page for storelocations.
This commit is contained in:
@@ -35,8 +35,10 @@ use App\Entity\Device;
|
||||
use App\Entity\Manufacturer;
|
||||
use App\Entity\NamedDBElement;
|
||||
use App\Entity\Part;
|
||||
use App\Entity\Storelocation;
|
||||
use App\Entity\Supplier;
|
||||
use App\Exceptions\EntityNotSupported;
|
||||
use Symfony\Component\HttpKernel\HttpCache\Store;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
|
||||
class EntityURLGenerator
|
||||
@@ -133,6 +135,10 @@ class EntityURLGenerator
|
||||
return $this->urlGenerator->generate("manufacturer_edit", ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
if ($entity instanceof Storelocation) {
|
||||
return $this->urlGenerator->generate("store_location_edit", ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
//Otherwise throw an error
|
||||
throw new EntityNotSupported('The given entity is not supported yet!');
|
||||
}
|
||||
@@ -170,6 +176,10 @@ class EntityURLGenerator
|
||||
return $this->urlGenerator->generate('manufacturer_new');
|
||||
}
|
||||
|
||||
if ($entity instanceof Storelocation) {
|
||||
return $this->urlGenerator->generate('store_location_new');
|
||||
}
|
||||
|
||||
throw new EntityNotSupported('The given entity is not supported yet!');
|
||||
}
|
||||
|
||||
@@ -228,6 +238,10 @@ class EntityURLGenerator
|
||||
return $this->urlGenerator->generate('manufacturer_new', ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
if ($entity instanceof Storelocation) {
|
||||
return $this->urlGenerator->generate('store_location_new', ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
throw new EntityNotSupported('The given entity is not supported yet!');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user