mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 09:14:09 +02:00
ImportRun: Add access to ImportSource
This commit is contained in:
parent
64f00940b1
commit
b4cb6f8ccb
@ -12,6 +12,9 @@ class ImportRun extends DbObject
|
||||
|
||||
protected $autoincKeyName = 'id';
|
||||
|
||||
/** @var ImportSource */
|
||||
protected $importSource = null;
|
||||
|
||||
protected $defaultProperties = array(
|
||||
'id' => null,
|
||||
'source_id' => null,
|
||||
@ -125,4 +128,12 @@ class ImportRun extends DbObject
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function importSource()
|
||||
{
|
||||
if ($this->importSource === null) {
|
||||
$this->importSource = ImportSource::load($this->get('source_id'), $this->connection);
|
||||
}
|
||||
return $this->importSource;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user