CSSettingsLogEntry
extends CSLogEntry
in package
Defines a plain and an abstract API object for the log handling.
Tags
Table of Contents
- __construct() : mixed
- CSSettingsLogEntry constructor.
- getBrowser() : string
- Returns the browser information.
- getContextClassId() : int
- Returns the context class id.
- getContextId() : int
- Returns the context ID.
- getContextIdentifier() : string
- Get's the name\label for an already deleted object. For the 'delete' event, the name is returned from the stored json, for all other event types, just the id is shown
- getContextType() : string
- Returns the context type.
- getDateTime() : string
- Returns the datetime of the API log object.
- getDescription() : string
- Returns the proper GUI log message to be shown to the user, based in the log (json) data stored in the database
- getEventType() : string
- Returns the event type.
- getLevel() : int
- Returns the log level.
- getNewValues() : array<string|int, mixed>
- Returns the log new values.
- getOldValues() : array<string|int, mixed>
- Returns the log old values.
- getShortDescription() : string
- Returns the SettingsLog short description based on the event type
- getType() : int
- Returns the log type.
- getUser() : CSUser|User|null
- Returns the defined user.
- getUserId() : int
- Returns the id of the defined user.
- getUserName() : string
- Returns the username of the defined user.
- setBrowser() : void
- Sets the browser information to the API log object.
- setContextClassId() : void
- Sets the context class id to the API log object.
- setContextId() : void
- Sets the context id to the API log object.
- setContextType() : void
- Sets the context type to the API log object.
- setDateTime() : void
- Sets the date time for the current API log object.
- setEventType() : void
- Sets the event type to the API log object.
- setLevel() : void
- Sets the log level.
- setNewValues() : void
- Sets the new values to the API log object.
- setOldValues() : void
- Sets the old values to the API log object.
- setType() : void
- Sets the log type.
- setUser() : void
- Sets the user object for the current API log object.
Methods
__construct()
CSSettingsLogEntry constructor.
public
__construct() : mixed
Tags
Return values
mixed —getBrowser()
Returns the browser information.
public
getBrowser() : string
Tags
Return values
string —with the stored browser information in the API log object.
getContextClassId()
Returns the context class id.
public
getContextClassId() : int
Tags
Return values
int —with the stored context class id in the API log object.
getContextId()
Returns the context ID.
public
getContextId() : int
Tags
Return values
int —with the stored context id in the API log object.
getContextIdentifier()
Get's the name\label for an already deleted object. For the 'delete' event, the name is returned from the stored json, for all other event types, just the id is shown
public
getContextIdentifier() : string
Tags
Return values
string —getContextType()
Returns the context type.
public
getContextType() : string
Tags
Return values
string —with the stored context type in the API log object.
getDateTime()
Returns the datetime of the API log object.
public
getDateTime() : string
Tags
Return values
string —with the datetime.
getDescription()
Returns the proper GUI log message to be shown to the user, based in the log (json) data stored in the database
public
getDescription([string $sLanguage = null ]) : string
Parameters
- $sLanguage : string = null
-
optional language to use for the translation
Tags
Return values
string —with the proper log message to be shown to the user
getEventType()
Returns the event type.
public
getEventType() : string
Tags
Return values
string —with the stored event type in the API log object.
getLevel()
Returns the log level.
public
getLevel() : int
Tags
Return values
int —with the level of the log.
getNewValues()
Returns the log new values.
public
getNewValues() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —with the stored new values in the API log object.
getOldValues()
Returns the log old values.
public
getOldValues() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —with the stored old values in the API log object.
getShortDescription()
Returns the SettingsLog short description based on the event type
public
getShortDescription([string $sLanguage = null ]) : string
Parameters
- $sLanguage : string = null
-
optional language to use for the translation
Tags
Return values
string —getType()
Returns the log type.
public
getType() : int
Tags
Return values
int —with the type of the log.
getUser()
Returns the defined user.
public
getUser() : CSUser|User|null
If no user has been defined the current user will be returned.
Tags
Return values
CSUser|User|null —the user API log object.
getUserId()
Returns the id of the defined user.
public
getUserId() : int
If no user has been defined the current user id will be returned.
Tags
Return values
int —with the user id of the API log object.
getUserName()
Returns the username of the defined user.
public
getUserName() : string
If no user has been defined the current username will be returned.
Tags
Return values
string —with the username of the API log object.
setBrowser()
Sets the browser information to the API log object.
public
setBrowser(string $sBrowser) : void
Parameters
- $sBrowser : string
-
The browser information.
Tags
Return values
void —setContextClassId()
Sets the context class id to the API log object.
public
setContextClassId(int $iContextClassId) : void
Parameters
- $iContextClassId : int
-
The class id.
Tags
Return values
void —setContextId()
Sets the context id to the API log object.
public
setContextId(int $iContextId) : void
Parameters
- $iContextId : int
-
The context id.
Tags
Return values
void —setContextType()
Sets the context type to the API log object.
public
setContextType(string $sContextType) : void
Parameters
- $sContextType : string
-
The context type.
Tags
Return values
void —setDateTime()
Sets the date time for the current API log object.
public
setDateTime(string $sDateTime) : void
If not set manually the date time will be set automatically in the constructor.
Parameters
- $sDateTime : string
Tags
Return values
void —setEventType()
Sets the event type to the API log object.
public
setEventType(string $sEventType) : void
Parameters
- $sEventType : string
-
The event type.
Tags
Return values
void —setLevel()
Sets the log level.
public
setLevel([int $iLevel = CSLog::LEVEL_MINIMUM ]) : void
Parameters
- $iLevel : int = CSLog::LEVEL_MINIMUM
Tags
Return values
void —setNewValues()
Sets the new values to the API log object.
public
setNewValues(array<string|int, mixed> $aNewValues) : void
Parameters
- $aNewValues : array<string|int, mixed>
-
The log new values.
Tags
Return values
void —setOldValues()
Sets the old values to the API log object.
public
setOldValues(array<string|int, mixed> $aOldValues) : void
Parameters
- $aOldValues : array<string|int, mixed>
-
The log old values.
Tags
Return values
void —setType()
Sets the log type.
public
setType([int $iType = CSLog::TYPE_NOTE ]) : void
Parameters
- $iType : int = CSLog::TYPE_NOTE
Tags
Return values
void —setUser()
Sets the user object for the current API log object.
public
setUser(User|CSUser $oUser) : void
Parameters
- $oUser : User|CSUser
