mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-22 01:49:05 +02:00
Added a admin page for storelocations.
This commit is contained in:
parent
487c78a22b
commit
defd169737
7 changed files with 205 additions and 15 deletions
|
@ -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!');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue