IcingaObject: add awareness for apply object type

This commit is contained in:
Thomas Gelf 2016-02-24 21:37:48 +01:00
parent bda927b446
commit fb6518a887
2 changed files with 10 additions and 0 deletions

View File

@ -30,6 +30,8 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
protected $supportsFields = false;
protected $supportsApplyRules = false;
protected $type;
/* key/value!! */
@ -112,9 +114,15 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
return $this->supportsFields;
}
public function supportsApplyRules()
{
return $this->supportsApplyRules;
}
public function hasBeenModified()
{
if ($this->supportsCustomVars() && $this->vars !== null && $this->vars()->hasBeenModified()) {
//var_dump($this->vars()); exit;
return true;
}

View File

@ -65,6 +65,8 @@ class IcingaService extends IcingaObject
protected $supportsImports = true;
protected $supportsApplyRules = true;
protected $keyName = array('host_id', 'object_name');
public function getCheckCommand()