mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-09-25 10:57:41 +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)
|
public static function logCreation(DbObject $object, Db $db)
|
||||||
{
|
{
|
||||||
$data = array(
|
$data = array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user