mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2026-06-03 22:04:27 -04:00
IcingaObject: introduce isObject helper method
This commit is contained in:
parent
5b9ba4e7e4
commit
dda16fd0d0
1 changed files with 8 additions and 0 deletions
|
|
@ -83,6 +83,8 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
|
||||
private $resolveCache = array();
|
||||
|
||||
private $cachedPlainUnmodified;
|
||||
|
||||
public function propertyIsBoolean($property)
|
||||
{
|
||||
return array_key_exists($property, $this->booleans);
|
||||
|
|
@ -962,6 +964,12 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
return parent::hasProperty($key);
|
||||
}
|
||||
|
||||
public function isObject()
|
||||
{
|
||||
return $this->hasProperty('object_type')
|
||||
&& $this->object_type === 'object';
|
||||
}
|
||||
|
||||
public function isTemplate()
|
||||
{
|
||||
return $this->hasProperty('object_type')
|
||||
|
|
|
|||
Loading…
Reference in a new issue