Documentation

LogEntryRepository extends LogEntryRepository
in package

Tags
copyright

Cloudrexx AG

author

Thomas Wirz thomas.wirz@cloudrexx.com

subpackage

core_model

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
inheritDoc

CLX-6073: Changed visibility to protected to allow access from {static::getLoggableListener()}

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
todo

Fix CLX-1776 and return number of total results as well

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
int

getLogEntriesQuery()

public getLogEntriesQuery(mixed $entity) : mixed
Parameters
$entity : mixed
Tags
inheritDoc

CLX-6073: Enforced string casting on contrexx_log_entry.object_id lookup

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
todo

Fix wrong paging for action 'deleted'

todo

Convert this method into a generic implementation for models which are using an editingStatus.

throws
LogEntryRepositoryException

if $entityClass is set to an unsupported model.

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
inheritDoc

CLX-6073: Enforced string casting on contrexx_log_entry.object_id lookup

getLoggableListener()

protected getLoggableListener() : mixed
Tags
inheritDoc

CLX-6073: Changed visibility to protected to allow calling from {static::revert()}


        
On this page

Search results