PageLogRepository
extends LogEntryRepository
in package
Page log repository
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructor
- 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
- getLogs() : array<string|int, mixed>
- Return selected Page log entries
- 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.
Properties
$em
protected
mixed
$em
= null
$pageRepo
protected
mixed
$pageRepo
= null
Methods
__construct()
Constructor
public
__construct(EntityManager $em, ClassMetadata $class) : mixed
Parameters
- $em : EntityManager
- $class : ClassMetadata
getLatestLog()
Returns the latest logs of all pages.
public
getLatestLog(Page $page) : array<string|int, mixed>
The log entries are filtered by the page object.
Parameters
- $page : Page
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
Return values
array<string|int, mixed>getLogEntriesCount()
Get Log entries count
public
getLogEntriesCount(object $entity) : int
Parameters
- $entity : object
-
Entity object
Return values
intgetLogs()
Return selected Page log entries
public
getLogs(int $offset, int $limit[, string $action = '' ][, int &$count = 0 ]) : array<string|int, mixed>
Parameters
- $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 = '' ]) : array<string|int, mixed>
The log entries are filtered by the page object.
Parameters
- $action : string = ''
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