mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 10:18:56 +02:00
Added a console command to view the event log.
This commit is contained in:
parent
4ddc9251d1
commit
3178dcbb6c
4 changed files with 315 additions and 65 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue