ActionMessages
Table of Contents
- fileExists() : bool
- Checking if the file exists
- getErrorMessageCode() : string
- Method returns error message code
- getFile() : string
- Method returns file data
- getSuccessMessageCode() : string
- Method returns success message code
- setErrorMessage() : void
- Method sets error message variable
- setPageVar() : void
- Setting page variables
- setSuccessMessage() : void
- Method sets success message variable
- getErrorMessageContent() : string
- Method sets error action message
- getJoinedJsonFilesData() : array<string, string>
- Method reads all files $fileName found in $this->paths and joins them
- getSuccessMessageContent() : string
- Method sets success action message
- getActionMessage() : string
- Method returns localized error message by it's key
Methods
fileExists()
Checking if the file exists
public
abstract fileExists(string $fileSubPath) : bool
Parameters
- $fileSubPath : string
-
file sub path
Return values
bool —true if the file exists, false otherwise
getErrorMessageCode()
Method returns error message code
public
static getErrorMessageCode() : string
Return values
string —error message code
getFile()
Method returns file data
public
abstract getFile(string $filePath) : string
Parameters
- $filePath : string
-
path to file
Return values
string —file content
getSuccessMessageCode()
Method returns success message code
public
static getSuccessMessageCode() : string
Return values
string —success message code
setErrorMessage()
Method sets error message variable
public
setErrorMessage(string $errorMessageLocator) : void
Parameters
- $errorMessageLocator : string
-
message locator
Tags
Return values
void —setPageVar()
Setting page variables
public
abstract setPageVar(string $var, mixed $value) : void
Parameters
- $var : string
-
variable name
- $value : mixed
-
variable value
Return values
void —setSuccessMessage()
Method sets success message variable
public
setSuccessMessage(string $successMessageLocator) : void
Parameters
- $successMessageLocator : string
-
message locator
Tags
Return values
void —getErrorMessageContent()
Method sets error action message
protected
getErrorMessageContent(string $errorMessage) : string
Parameters
- $errorMessage : string
-
error message
Return values
string —compiled error message
getJoinedJsonFilesData()
Method reads all files $fileName found in $this->paths and joins them
protected
abstract getJoinedJsonFilesData(string $fileName) : array<string, string>
Parameters
- $fileName : string
-
file name to be fetched
Return values
array<string, string> —compound JSON object as assoc array
getSuccessMessageContent()
Method sets success action message
protected
getSuccessMessageContent(string $successMessage) : string
Parameters
- $successMessage : string
-
success message
Return values
string —compiled success message
getActionMessage()
Method returns localized error message by it's key
private
getActionMessage(string $actionMessageCode) : string
Parameters
- $actionMessageCode : string
-
key of the message
Return values
string —localized error message by it's key