diff --git a/library/Director/Objects/IcingaObject.php b/library/Director/Objects/IcingaObject.php index b07c88e7..a0386a4e 100644 --- a/library/Director/Objects/IcingaObject.php +++ b/library/Director/Objects/IcingaObject.php @@ -1371,6 +1371,12 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer return $class::load($id, $db); } + public static function existsByType($type, $id, Db $db) + { + $class = self::classByType($type); + return $class::exists($id, $db); + } + public static function loadAllByType($type, Db $db, $query = null, $keyColumn = 'object_name') { $class = self::classByType($type);