mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 08:44:11 +02:00
IcingaObject: add createByType method
This commit is contained in:
parent
61674546d9
commit
2b46eff08f
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user