LogEntry extends AbstractEntity uses LogDataTrait

A sys log entry This model is 'complete': All current database properties are in there.

Internal

This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.

Table of Contents

Properties

$_languageUid  : int
$_localizedUid  : int
$_versionedUid  : int
$action  : int
Action ID of the action that happened, for example 3 was a file action
$backendUserUid  : int
This is not a relation to BeUser model, since the user does not always exist, but we want the uid in then anyway.
$channel  : string
Channel name.
$details  : string
This is the log message itself, but possibly with %s substitutions.
$detailsNumber  : int
Details number
$error  : int
Error code
$eventPid  : int
Event PID
$ip  : string
IP address of client
$level  : string
Level.
$logData  : string
Serialized log data. This is a serialized array with substitutions for $this->details.
$newId  : string
New ID
$pid  : int
Storage page ID of the log entry
$recordPid  : int
PID of the record the event happened to
$recordUid  : int
UID of the record the event happened to
$tableName  : string
Table name
$tstamp  : int
Timestamp when the log entry was written
$type  : int
Type code
$uid  : int
$workspaceUid  : int
This is only the UID and not the full workspace object for the same reason as in $beUserUid.

Methods

__clone()  : mixed
Clone method. Sets the _isClone property.
__toString()  : string
Returns the class name and the uid of the object as string
_getCleanProperties()  : array<string|int, mixed>
Returns a hash map of clean properties and $values.
_getCleanProperty()  : mixed
Returns the clean value of the given property. The returned value will be NULL if the clean state was not memorized before, or if the clean value is NULL.
_getProperties()  : array<string|int, mixed>
Returns a hash map of property names and property values. Only for internal use.
_getProperty()  : mixed
Returns the property value of the given property name. Only for internal use.
_hasProperty()  : bool
Returns the property value of the given property name. Only for internal use.
_isClone()  : bool
Returns TRUE if the object has been cloned, FALSE otherwise.
_isDirty()  : bool
Returns TRUE if the properties were modified after reconstitution
_isNew()  : bool
Returns TRUE if the object is new (the uid was not set, yet). Only for internal use
_memorizeCleanState()  : mixed
Register an object's clean state, e.g. after it has been reconstituted from the database.
_memorizePropertyCleanState()  : mixed
Register a properties's clean state, e.g. after it has been reconstituted from the database.
_setClone()  : mixed
Setter whether this Domain Object is a clone of another one.
_setProperty()  : bool
Reconstitutes a property. Only for internal use.
getAction()  : int
Get action
getBackendUserUid()  : int
Get backend user id
getChannel()  : string
Get channel
getDetails()  : string
Get details
getDetailsNumber()  : int
Get details number
getError()  : int
Get error
getErrorIconClass()  : string
Get class name for the error code
getEventPid()  : int
Get event pid
getIp()  : string
Get ip
getLevel()  : string
Get level
getLogData()  : array<string|int, mixed>
Get log data
getNewId()  : string|int
Get new id
getPid()  : int|null
Getter for the pid.
getRecordPid()  : int
Get record pid
getRecordUid()  : int
Get record uid
getTableName()  : string
Get table name
getTstamp()  : int
Get tstamp
getType()  : int
Get type
getUid()  : int|null
Getter for uid.
getWorkspaceUid()  : int
Get workspace
setAction()  : mixed
Set action
setBackendUserUid()  : mixed
Set backend user uid
setChannel()  : void
Set channel
setDetails()  : mixed
Set details
setDetailsNumber()  : mixed
Set details number
setError()  : mixed
Set error
setEventPid()  : mixed
Set event pid
setIp()  : mixed
Set ip
setLevel()  : void
Set level
setLogData()  : mixed
Set log data
setNewId()  : mixed
Set new id
setPid()  : void
Setter for the pid.
setRecordPid()  : mixed
Set record pid
setRecordUid()  : mixed
Set record uid
setTableName()  : mixed
Set table name
setTstamp()  : mixed
Set tstamp
setType()  : mixed
Set type
setWorkspaceUid()  : mixed
Set workspace uid
formatLogDetails()  : string
Replaces a string with placeholders (%s or {myPlaceholder}) with its substitutes.
formatLogDetailsStatic()  : string
Static version for ViewHelpers etc.
isPropertyDirty()  : bool
Checks the $value against the $cleanState.
unserializeLogData()  : array<string|int, mixed>|null
Useful for handling old serialized data, which might have been migrated to JSON encoded properties already.

Properties

$_languageUid

protected int $_languageUid

The uid of the language of the object. This is the uid of the language record in the table sys_language.

$_localizedUid

protected int $_localizedUid

The uid of the localized record. Holds the uid of the record in default language (the translationOrigin).

$_versionedUid

protected int $_versionedUid

The uid of the versioned record.

$action

Action ID of the action that happened, for example 3 was a file action

protected int $action = 0

$backendUserUid

This is not a relation to BeUser model, since the user does not always exist, but we want the uid in then anyway.

protected int $backendUserUid = 0

This case is ugly in extbase, the best way we have found now is to resolve the username (if it exists) in a view helper and just use the uid of the be user here.

$channel

Channel name.

protected string $channel = 'narf'

$details

This is the log message itself, but possibly with %s substitutions.

protected string $details = ''

$detailsNumber

Details number

protected int $detailsNumber = 0

$eventPid

Event PID

protected int $eventPid = 0

$ip

IP address of client

protected string $ip = ''

$logData

Serialized log data. This is a serialized array with substitutions for $this->details.

protected string $logData = ''

$newId

New ID

protected string $newId = 0
Tags
todo:

should be string|int but extbase chokes on this while mapping

$pid

Storage page ID of the log entry

protected int $pid = 0

$recordPid

PID of the record the event happened to

protected int $recordPid = 0

$recordUid

UID of the record the event happened to

protected int $recordUid = 0

$tableName

Table name

protected string $tableName = ''

$tstamp

Timestamp when the log entry was written

protected int $tstamp = 0

$uid

protected int $uid

The uid of the record. The uid is only unique in the context of the database table.

$workspaceUid

This is only the UID and not the full workspace object for the same reason as in $beUserUid.

protected int $workspaceUid = 0

Methods

__clone()

Clone method. Sets the _isClone property.

public __clone() : mixed

__toString()

Returns the class name and the uid of the object as string

public __toString() : string
Return values
string

_getCleanProperties()

Returns a hash map of clean properties and $values.

public _getCleanProperties() : array<string|int, mixed>
Return values
array<string|int, mixed>

_getCleanProperty()

Returns the clean value of the given property. The returned value will be NULL if the clean state was not memorized before, or if the clean value is NULL.

public _getCleanProperty(string $propertyName) : mixed
Parameters
$propertyName : string

The name of the property to be memorized.

Internal
Return values
mixed

The clean property value or NULL

_getProperties()

Returns a hash map of property names and property values. Only for internal use.

public _getProperties() : array<string|int, mixed>
Internal
Return values
array<string|int, mixed>

The properties

_getProperty()

Returns the property value of the given property name. Only for internal use.

public _getProperty(string $propertyName) : mixed
Parameters
$propertyName : string
Internal
Return values
mixed

The propertyValue

_hasProperty()

Returns the property value of the given property name. Only for internal use.

public _hasProperty(string $propertyName) : bool
Parameters
$propertyName : string
Internal
Return values
bool

TRUE bool true if the property exists, FALSE if it doesn't exist or NULL in case of an error.

_isClone()

Returns TRUE if the object has been cloned, FALSE otherwise.

public _isClone() : bool
Return values
bool

TRUE if the object has been cloned

_isDirty()

Returns TRUE if the properties were modified after reconstitution

public _isDirty([string $propertyName = null ]) : bool
Parameters
$propertyName : string = null

An optional name of a property to be checked if its value is dirty

Tags
throws
TooDirtyException
Return values
bool

_isNew()

Returns TRUE if the object is new (the uid was not set, yet). Only for internal use

public _isNew() : bool
Internal
Return values
bool

_memorizeCleanState()

Register an object's clean state, e.g. after it has been reconstituted from the database.

public _memorizeCleanState([string $propertyName = null ]) : mixed
Parameters
$propertyName : string = null

The name of the property to be memorized. If omitted all persistable properties are memorized.

_memorizePropertyCleanState()

Register a properties's clean state, e.g. after it has been reconstituted from the database.

public _memorizePropertyCleanState(string $propertyName) : mixed
Parameters
$propertyName : string

The name of the property to be memorized. If omitted all persistable properties are memorized.

_setClone()

Setter whether this Domain Object is a clone of another one.

public _setClone(bool $clone) : mixed

NEVER SET THIS PROPERTY DIRECTLY. We currently need it to make the _isDirty check inside AbstractEntity work, but it is just a work- around right now.

Parameters
$clone : bool

_setProperty()

Reconstitutes a property. Only for internal use.

public _setProperty(string $propertyName, mixed $propertyValue) : bool
Parameters
$propertyName : string
$propertyValue : mixed
Internal
Return values
bool

getAction()

Get action

public getAction() : int
Return values
int

getBackendUserUid()

Get backend user id

public getBackendUserUid() : int
Return values
int

getChannel()

Get channel

public getChannel() : string
Return values
string

getDetails()

Get details

public getDetails() : string
Return values
string

getDetailsNumber()

Get details number

public getDetailsNumber() : int
Return values
int

getError()

Get error

public getError() : int
Return values
int

getErrorIconClass()

Get class name for the error code

public getErrorIconClass() : string
Return values
string

getEventPid()

Get event pid

public getEventPid() : int
Return values
int

getIp()

Get ip

public getIp() : string
Return values
string

getLevel()

Get level

public getLevel() : string
Return values
string

getLogData()

Get log data

public getLogData() : array<string|int, mixed>
Return values
array<string|int, mixed>

getNewId()

Get new id

public getNewId() : string|int
Return values
string|int

getPid()

Getter for the pid.

public getPid() : int|null
Return values
int|null

The pid or NULL if none set yet.

getRecordPid()

Get record pid

public getRecordPid() : int
Return values
int

getRecordUid()

Get record uid

public getRecordUid() : int
Return values
int

getTableName()

Get table name

public getTableName() : string
Return values
string

getTstamp()

Get tstamp

public getTstamp() : int
Return values
int

getType()

Get type

public getType() : int
Return values
int

getUid()

Getter for uid.

public getUid() : int|null
Return values
int|null

The uid or NULL if none set yet.

getWorkspaceUid()

Get workspace

public getWorkspaceUid() : int
Return values
int

setAction()

Set action

public setAction(int $action) : mixed
Parameters
$action : int

setBackendUserUid()

Set backend user uid

public setBackendUserUid(int $beUserUid) : mixed
Parameters
$beUserUid : int

setChannel()

Set channel

public setChannel(string $channel) : void
Parameters
$channel : string

setDetails()

Set details

public setDetails(string $details) : mixed
Parameters
$details : string

setDetailsNumber()

Set details number

public setDetailsNumber(int $detailsNumber) : mixed
Parameters
$detailsNumber : int

setError()

Set error

public setError(int $error) : mixed
Parameters
$error : int

setEventPid()

Set event pid

public setEventPid(int $eventPid) : mixed
Parameters
$eventPid : int

setIp()

Set ip

public setIp(string $ip) : mixed
Parameters
$ip : string

setLevel()

Set level

public setLevel(string $level) : void
Parameters
$level : string

setLogData()

Set log data

public setLogData(string $logData) : mixed
Parameters
$logData : string

setNewId()

Set new id

public setNewId(string $newId) : mixed
Parameters
$newId : string

setPid()

Setter for the pid.

public setPid(int $pid) : void
Parameters
$pid : int

setRecordPid()

Set record pid

public setRecordPid(int $recordPid) : mixed
Parameters
$recordPid : int

setRecordUid()

Set record uid

public setRecordUid(int $recordUid) : mixed
Parameters
$recordUid : int

setTableName()

Set table name

public setTableName(string $tableName) : mixed
Parameters
$tableName : string

setTstamp()

Set tstamp

public setTstamp(int $tstamp) : mixed
Parameters
$tstamp : int

setType()

Set type

public setType(int $type) : mixed
Parameters
$type : int

setWorkspaceUid()

Set workspace uid

public setWorkspaceUid(int $workspaceUid) : mixed
Parameters
$workspaceUid : int

formatLogDetails()

Replaces a string with placeholders (%s or {myPlaceholder}) with its substitutes.

protected formatLogDetails(string $detailString, mixed $substitutes) : string
Parameters
$detailString : string
$substitutes : mixed
Return values
string

formatLogDetailsStatic()

Static version for ViewHelpers etc.

protected static formatLogDetailsStatic(string $detailString, array<string|int, mixed> $substitutes) : string

Replaces a string with placeholders (%s or {myPlaceholder}) with its substitutes.

Parameters
$detailString : string
$substitutes : array<string|int, mixed>
Return values
string

isPropertyDirty()

Checks the $value against the $cleanState.

protected isPropertyDirty(mixed $previousValue, mixed $currentValue) : bool
Parameters
$previousValue : mixed
$currentValue : mixed
Return values
bool

unserializeLogData()

Useful for handling old serialized data, which might have been migrated to JSON encoded properties already.

protected unserializeLogData(mixed $logData) : array<string|int, mixed>|null
Parameters
$logData : mixed
Return values
array<string|int, mixed>|null

        
On this page

Search results