mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-27 07:44:05 +02:00
DbObject: allow to set loaded properties
This commit is contained in:
parent
2994403aa8
commit
8ec56ff16e
@ -747,6 +747,16 @@ abstract class DbObject
|
|||||||
$this->modifiedProperties = [];
|
$this->modifiedProperties = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setLoadedProperty($key, $value)
|
||||||
|
{
|
||||||
|
if ($this->hasBeenLoadedFromDb()) {
|
||||||
|
$this->set($key, $value);
|
||||||
|
$this->loadedProperties[$key] = $this->get($key);
|
||||||
|
} else {
|
||||||
|
throw new RuntimeException('Cannot set loaded property for new object');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function getOriginalProperties()
|
public function getOriginalProperties()
|
||||||
{
|
{
|
||||||
return $this->loadedProperties;
|
return $this->loadedProperties;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user