LatestBeLoginsDataProvider
readonly class \
Data provider for "Latest backend logins" widget.
Fetches successful backend user login entries from sys_log.
Table of Contents
Methods
- __construct() : mixed
- enrichLogEntries() : array
- Enriches log entries with the information of the backend users. Entries of unknown (e.g. deleted) users are omitted.
- getItems() : array
- getPaginator() : PaginatorInterface
- Provides the successful backend logins, newest first. The paginated items are raw log entries, which can be turned into widget items via enrichLogEntries().
Methods
__construct()
public
__construct(ConnectionPool $connectionPool) : mixed
Parameters
- $connectionPool : ConnectionPool
enrichLogEntries()
Enriches log entries with the information of the backend users. Entries of unknown (e.g. deleted) users are omitted.
public
enrichLogEntries(iterable<string|int, mixed> $logEntries) : array
Parameters
- $logEntries : iterable<string|int, mixed>
Return values
arraygetItems()
public
getItems([int $limit = 10 ]) : array
Parameters
- $limit : int = 10
Return values
arraygetPaginator()
Provides the successful backend logins, newest first. The paginated items are raw log entries, which can be turned into widget items via enrichLogEntries().
public
getPaginator(int $currentPage, int $itemsPerPage) : PaginatorInterface
Parameters
- $currentPage : int
- $itemsPerPage : int