mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-09-13 04:58:10 +02:00
DirectorActivityLog: allow to loadLatest()
This commit is contained in:
parent
95afce9d5a
commit
984f28bfdc
@ -43,6 +43,13 @@ class DirectorActivityLog extends DbObject
|
||||
}
|
||||
}
|
||||
|
||||
public static function loadLatest(Db $connection)
|
||||
{
|
||||
$db = $connection->getDbAdapter();
|
||||
$query = $db->select()->from($this->table, array('id' => 'MAX(id)'));
|
||||
return static::load($db->fetchOne($query));
|
||||
}
|
||||
|
||||
public static function logCreation(DbObject $object, Db $db)
|
||||
{
|
||||
$data = array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user