mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 09:14:09 +02:00
IcingaObject: introduce isObject helper method
This commit is contained in:
parent
5b9ba4e7e4
commit
dda16fd0d0
@ -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…
x
Reference in New Issue
Block a user