IcingaService: add basics for command resolution

This commit is contained in:
Thomas Gelf 2015-11-15 16:39:20 +01:00
parent dff0e1a263
commit 7fb1182cc8
1 changed files with 14 additions and 0 deletions

View File

@ -42,6 +42,20 @@ class IcingaService extends IcingaObject
protected $supportsImports = true;
public function getCheckCommand()
{
$id = $this->getResolvedProperty('check_command_id');
return IcingaCommand::loadWithAutoIncId(
$id,
$this->getConnection()
);
}
public function hasCheckCommand()
{
return $this->getResolvedProperty('check_command_id') !== null;
}
protected function renderCheck_command_id()
{
return $this->renderCommandProperty($this->check_command_id);