mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-22 01:49:05 +02:00
Added a 'clone part' function.
This commit is contained in:
parent
33631f16cf
commit
10f39b7f45
7 changed files with 87 additions and 16 deletions
|
@ -90,6 +90,16 @@ class EntityURLGenerator
|
|||
throw new EntityNotSupported('The given entity is not supported yet!');
|
||||
}
|
||||
|
||||
public function cloneURL($entity) : string
|
||||
{
|
||||
if($entity instanceof Part)
|
||||
{
|
||||
return $this->urlGenerator->generate('part_clone', ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
throw new EntityNotSupported('The given entity is not supported yet!');
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates an HTML link to the info page about the given entity.
|
||||
* @param $entity mixed The entity for which the info link should be generated.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue