LogEntry extends AbstractEntity uses LogDataTrait
A sys log entry This model is 'complete': All current database properties are in there.
This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
Table of Contents
Constants
- PROPERTY_LANGUAGE_UID = '_languageUid'
- PROPERTY_LOCALIZED_UID = '_localizedUid'
- PROPERTY_PID = 'pid'
- PROPERTY_UID = 'uid'
- PROPERTY_VERSIONED_UID = '_versionedUid'
Properties
- $_languageUid : int<-1, max>|null
- $_localizedUid : int<0, max>|null
- $_versionedUid : int|null
- The uid of the versioned record.
- $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<0, max>|null
- 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<1, max>|null
- $workspaceUid : int
- This is only the UID and not the full workspace object for the same reason as in $beUserUid.
Methods
- __clone() : mixed
- __toString() : non-empty-string
- _getCleanProperties() : array<non-empty-string, 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<non-empty-string, mixed>
- _getProperty() : mixed
- _hasProperty() : bool
- _isClone() : bool
- _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)
- _memorizeCleanState() : void
- Register an object's clean state, e.g. after it has been reconstituted from the database.
- _memorizePropertyCleanState() : void
- Register a property'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
- getAction() : int
- getBackendUserUid() : int
- getChannel() : string
- getDetails() : string
- getDetailsNumber() : int
- getError() : int
- getErrorIconClass() : string
- getEventPid() : int
- getIp() : string
- getLevel() : string
- getLogData() : array<string|int, mixed>
- getLogDataRaw() : string
- getNewId() : string|int
- Get new id
- getPid() : int<0, max>|null
- getRecordPid() : int
- getRecordUid() : int
- getTableName() : string
- getTstamp() : int
- getType() : int
- getUid() : int<1, max>|null
- getWorkspaceUid() : int
- setAction() : void
- setBackendUserUid() : void
- setChannel() : void
- setDetails() : void
- setDetailsNumber() : void
- setError() : void
- setEventPid() : void
- setIp() : void
- setLevel() : void
- setLogData() : void
- setNewId() : void
- Set new id
- setPid() : void
- setRecordPid() : void
- setRecordUid() : void
- setTableName() : void
- setTstamp() : void
- setType() : void
- setWorkspaceUid() : void
- 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.
Constants
PROPERTY_LANGUAGE_UID
public
mixed
PROPERTY_LANGUAGE_UID
= '_languageUid'
PROPERTY_LOCALIZED_UID
public
mixed
PROPERTY_LOCALIZED_UID
= '_localizedUid'
PROPERTY_PID
public
mixed
PROPERTY_PID
= 'pid'
PROPERTY_UID
public
mixed
PROPERTY_UID
= 'uid'
PROPERTY_VERSIONED_UID
public
mixed
PROPERTY_VERSIONED_UID
= '_versionedUid'
Properties
$_languageUid
protected
int<-1, max>|null
$_languageUid
= null
The uid of the language of the object. This is the id of the corresponding sing language.
Tags
$_localizedUid
protected
int<0, max>|null
$_localizedUid
= null
The uid of the localized record. Holds the uid of the record in default language (the translationOrigin).
Tags
$_versionedUid
The uid of the versioned record.
protected
int|null
$_versionedUid
= null
Tags
$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
= ''
$details
This is the log message itself, but possibly with %s substitutions.
protected
string
$details
= ''
$detailsNumber
Details number
protected
int
$detailsNumber
= 0
$error
Error code
protected
int
$error
= 0
$eventPid
Event PID
protected
int
$eventPid
= 0
$ip
IP address of client
protected
string
$ip
= ''
$level
Level.
protected
string
$level
= ''
$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
$pid
Storage page ID of the log entry
protected
int<0, max>|null
$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
$type
Type code
protected
int
$type
= 0
$uid
protected
int<1, max>|null
$uid
The uid of the record. The uid is only unique in the context of the database table.
Tags
$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()
public
__clone() : mixed
__toString()
public
__toString() : non-empty-string
Return values
non-empty-string_getCleanProperties()
Returns a hash map of clean properties and $values.
public
_getCleanProperties() : array<non-empty-string, mixed>
Return values
array<non-empty-string, 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(non-empty-string $propertyName) : mixed
Parameters
- $propertyName : non-empty-string
-
The name of the property to be memorized.
Return values
mixed —The clean property value or NULL
_getProperties()
public
_getProperties() : array<non-empty-string, mixed>
Return values
array<non-empty-string, mixed> —a hash map of property names and property values.
_getProperty()
public
_getProperty(string $propertyName) : mixed
Parameters
- $propertyName : string
_hasProperty()
public
_hasProperty(non-empty-string $propertyName) : bool
Parameters
- $propertyName : non-empty-string
Return values
bool_isClone()
public
_isClone() : bool
Return values
bool_isDirty()
Returns TRUE if the properties were modified after reconstitution
public
_isDirty([non-empty-string|null $propertyName = null ]) : bool
Parameters
- $propertyName : non-empty-string|null = null
-
An optional name of a property to be checked if its value is dirty
Tags
Return values
bool_isNew()
Returns TRUE if the object is new (the uid was not set, yet)
public
_isNew() : bool
Return values
bool_memorizeCleanState()
Register an object's clean state, e.g. after it has been reconstituted from the database.
public
_memorizeCleanState([non-empty-string|null $propertyName = null ]) : void
Parameters
- $propertyName : non-empty-string|null = null
-
The name of the property to be memorized. If omitted all persistable properties are memorized.
_memorizePropertyCleanState()
Register a property's clean state, e.g. after it has been reconstituted from the database.
public
_memorizePropertyCleanState(non-empty-string $propertyName) : void
Parameters
- $propertyName : non-empty-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()
public
_setProperty(string $propertyName, mixed $propertyValue) : bool
Parameters
- $propertyName : string
- $propertyValue : mixed
Return values
boolgetAction()
public
getAction() : int
Return values
intgetBackendUserUid()
public
getBackendUserUid() : int
Return values
intgetChannel()
public
getChannel() : string
Return values
stringgetDetails()
public
getDetails() : string
Return values
stringgetDetailsNumber()
public
getDetailsNumber() : int
Return values
intgetError()
public
getError() : int
Return values
intgetErrorIconClass()
public
getErrorIconClass() : string
Return values
stringgetEventPid()
public
getEventPid() : int
Return values
intgetIp()
public
getIp() : string
Return values
stringgetLevel()
public
getLevel() : string
Return values
stringgetLogData()
public
getLogData() : array<string|int, mixed>
Return values
array<string|int, mixed>getLogDataRaw()
public
getLogDataRaw() : string
Return values
stringgetNewId()
Get new id
public
getNewId() : string|int
Return values
string|intgetPid()
public
getPid() : int<0, max>|null
Return values
int<0, max>|nullgetRecordPid()
public
getRecordPid() : int
Return values
intgetRecordUid()
public
getRecordUid() : int
Return values
intgetTableName()
public
getTableName() : string
Return values
stringgetTstamp()
public
getTstamp() : int
Return values
intgetType()
public
getType() : int
Return values
intgetUid()
public
getUid() : int<1, max>|null
Return values
int<1, max>|nullgetWorkspaceUid()
public
getWorkspaceUid() : int
Return values
intsetAction()
public
setAction(int $action) : void
Parameters
- $action : int
setBackendUserUid()
public
setBackendUserUid(int $beUserUid) : void
Parameters
- $beUserUid : int
setChannel()
public
setChannel(string $channel) : void
Parameters
- $channel : string
setDetails()
public
setDetails(string $details) : void
Parameters
- $details : string
setDetailsNumber()
public
setDetailsNumber(int $detailsNumber) : void
Parameters
- $detailsNumber : int
setError()
public
setError(int $error) : void
Parameters
- $error : int
setEventPid()
public
setEventPid(int $eventPid) : void
Parameters
- $eventPid : int
setIp()
public
setIp(string $ip) : void
Parameters
- $ip : string
setLevel()
public
setLevel(string $level) : void
Parameters
- $level : string
setLogData()
public
setLogData(string $logData) : void
Parameters
- $logData : string
setNewId()
Set new id
public
setNewId(string $newId) : void
Parameters
- $newId : string
setPid()
public
setPid(int<0, max> $pid) : void
Parameters
- $pid : int<0, max>
setRecordPid()
public
setRecordPid(int $recordPid) : void
Parameters
- $recordPid : int
setRecordUid()
public
setRecordUid(int $recordUid) : void
Parameters
- $recordUid : int
setTableName()
public
setTableName(string $tableName) : void
Parameters
- $tableName : string
setTstamp()
public
setTstamp(int $tstamp) : void
Parameters
- $tstamp : int
setType()
public
setType(int $type) : void
Parameters
- $type : int
setWorkspaceUid()
public
setWorkspaceUid(int $workspaceUid) : void
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
stringformatLogDetailsStatic()
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
stringisPropertyDirty()
Checks the $value against the $cleanState.
protected
isPropertyDirty(mixed $previousValue, mixed $currentValue) : bool
Parameters
- $previousValue : mixed
- $currentValue : mixed
Return values
boolunserializeLogData()
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