mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-09-25 18:59:05 +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';
|
protected $autoincKeyName = 'id';
|
||||||
|
|
||||||
|
/** @var ImportSource */
|
||||||
|
protected $importSource = null;
|
||||||
|
|
||||||
protected $defaultProperties = array(
|
protected $defaultProperties = array(
|
||||||
'id' => null,
|
'id' => null,
|
||||||
'source_id' => null,
|
'source_id' => null,
|
||||||
@ -125,4 +128,12 @@ class ImportRun extends DbObject
|
|||||||
|
|
||||||
return $result;
|
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