mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-06 15:30:13 +01:00
Added a 'clone part' function.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user