mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-25 03:08:51 +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
|
@ -56,6 +56,7 @@ abstract class DBElement
|
|||
return (int) $this->id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the ID as an string, defined by the element class.
|
||||
* This should have a form like P000014, for a part with ID 14.
|
||||
|
@ -63,4 +64,10 @@ abstract class DBElement
|
|||
*/
|
||||
abstract public function getIDString() : string;
|
||||
|
||||
public function __clone()
|
||||
{
|
||||
//Set ID to null, so that an new entry is created
|
||||
$this->id = null;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue