mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 18:58:46 +02:00
Added a basic admin page for categories.
This commit is contained in:
parent
220d600cca
commit
424407f253
6 changed files with 319 additions and 102 deletions
|
@ -114,6 +114,10 @@ class EntityURLGenerator
|
|||
return $this->urlGenerator->generate('attachment_type_edit', ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
if($entity instanceof Category) {
|
||||
return $this->urlGenerator->generate("category_edit", ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
//Otherwise throw an error
|
||||
throw new EntityNotSupported('The given entity is not supported yet!');
|
||||
}
|
||||
|
@ -135,6 +139,10 @@ class EntityURLGenerator
|
|||
return $this->urlGenerator->generate('attachment_type_new');
|
||||
}
|
||||
|
||||
if($entity instanceof Category) {
|
||||
return $this->urlGenerator->generate('category_new');
|
||||
}
|
||||
|
||||
throw new EntityNotSupported('The given entity is not supported yet!');
|
||||
}
|
||||
|
||||
|
@ -177,6 +185,10 @@ class EntityURLGenerator
|
|||
return $this->urlGenerator->generate('attachment_type_delete', ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
if($entity instanceof Category) {
|
||||
return $this->urlGenerator->generate('category_delete', ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
throw new EntityNotSupported('The given entity is not supported yet!');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue