mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-27 22:34:32 +02:00
Add a reference to the used info provider to a part
This commit is contained in:
parent
db97114fb4
commit
a95ba1acc4
11 changed files with 481 additions and 0 deletions
|
@ -114,6 +114,9 @@ class Part extends AttachmentContainingDBElement
|
|||
$this->orderdetails = new ArrayCollection();
|
||||
$this->parameters = new ArrayCollection();
|
||||
$this->project_bom_entries = new ArrayCollection();
|
||||
|
||||
//By default, the part has no provider
|
||||
$this->providerReference = InfoProviderReference::noProvider();
|
||||
}
|
||||
|
||||
public function __clone()
|
||||
|
@ -139,6 +142,9 @@ class Part extends AttachmentContainingDBElement
|
|||
foreach ($parameters as $parameter) {
|
||||
$this->addParameter(clone $parameter);
|
||||
}
|
||||
|
||||
//Deep clone info provider
|
||||
$this->providerReference = clone $this->providerReference;
|
||||
}
|
||||
parent::__clone();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue