mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-03 14:06:45 +01:00
Added a console command to view the event log.
This commit is contained in:
@@ -55,6 +55,18 @@ class LogEntryRepository extends EntityRepository
|
||||
return $this->findBy(['element' => $element], ['timestamp' => $order], $limit, $offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the last log entries ordered by timestamp
|
||||
* @param string $order
|
||||
* @param null $limit
|
||||
* @param null $offset
|
||||
* @return array
|
||||
*/
|
||||
public function getLogsOrderedByTimestamp($order = 'DESC', $limit = null, $offset = null)
|
||||
{
|
||||
return $this->findBy([], ['timestamp' => $order], $limit, $offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the target element associated with the logentry.
|
||||
* @param AbstractLogEntry $logEntry
|
||||
|
||||
Reference in New Issue
Block a user