LogEntryRepository
extends LogEntryRepository
in package
Tags
Table of Contents
Properties
- $listener : mixed
Methods
- getLatestLog() : array<string|int, mixed>
- Returns the latest logs of all pages.
- getLogEntries() : array<string|int, mixed>
- Loads all log entries for the given $entity
- getLogEntriesCount() : int
- Get Log entries count
- getLogEntriesQuery() : mixed
- getLogs() : array<string|int, mixed>
- Returns an array of log entries of the model specified by class $entityClassof.
- getLogsByAction() : array<string|int, mixed>
- Returns an array with the log entries of the given action.
- getUsernameByLog() : string
- Returns the user name from the given log.
- revert() : mixed
- getLoggableListener() : mixed
Properties
$listener
protected
mixed
$listener
Tags
Methods
getLatestLog()
Returns the latest logs of all pages.
public
getLatestLog(EntityBase $entity) : array<string|int, mixed>
The log entries are filtered by the page object.
Parameters
- $entity : EntityBase
Return values
array<string|int, mixed> —$result
getLogEntries()
Loads all log entries for the given $entity
public
getLogEntries(object $entity[, bool $useCache = true ][, int $limit = 0 ][, int $offset = 0 ]) : array<string|int, mixed>
Parameters
- $entity : object
-
Entity object
- $useCache : bool = true
-
If true then take entries from cache otherwise from DB
- $limit : int = 0
-
Entries count
- $offset : int = 0
-
Offset value
Tags
Return values
array<string|int, mixed>getLogEntriesCount()
Get Log entries count
public
getLogEntriesCount(object $entity) : int
As soon as CLX-1776 is implemented use getLogEntries() instead
Parameters
- $entity : object
-
Entity object
Return values
intgetLogEntriesQuery()
public
getLogEntriesQuery(mixed $entity) : mixed
Parameters
- $entity : mixed
Tags
getLogs()
Returns an array of log entries of the model specified by class $entityClassof.
public
getLogs(string $entityClass, int $offset, int $limit[, string $action = '' ][, int &$count = 0 ]) : array<string|int, mixed>
Parameters
- $entityClass : string
-
Class of model to load logs from
- $offset : int
- $limit : int
- $action : string = ''
-
Defaults to 'create' if empty
- $count : int = 0
-
By reference; set to result count
Tags
Return values
array<string|int, mixed>getLogsByAction()
Returns an array with the log entries of the given action.
public
getLogsByAction(string $action[, string $entityClass = '' ]) : array<string|int, mixed>
The log entries are filtered by the page object.
Parameters
- $action : string
- $entityClass : string = ''
-
Entity class to get logs of
Return values
array<string|int, mixed> —$result
getUsernameByLog()
Returns the user name from the given log.
public
getUsernameByLog(mixed $log) : string
Parameters
- $log : mixed
Return values
string —$username
revert()
public
revert(mixed $entity[, mixed $version = 1 ]) : mixed
Parameters
- $entity : mixed
- $version : mixed = 1
Tags
getLoggableListener()
protected
getLoggableListener() : mixed