Added a basic admin page for categories.

This commit is contained in:
Jan Böhmer 2019-04-20 20:39:06 +02:00
parent 220d600cca
commit 424407f253
6 changed files with 319 additions and 102 deletions

View file

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