Added a 'clone part' function.

This commit is contained in:
Jan Böhmer 2019-03-19 19:53:23 +01:00
parent 33631f16cf
commit 10f39b7f45
7 changed files with 87 additions and 16 deletions

View file

@ -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.