‪TYPO3CMS  9.5
TYPO3\CMS\Extbase\Error\Message Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Error\Message:
TYPO3\CMS\Extbase\Error\Error TYPO3\CMS\Extbase\Error\Notice TYPO3\CMS\Extbase\Error\Warning TYPO3\CMS\Extbase\Validation\Error

Public Member Functions

 __construct ($message, $code, array $arguments=[], $title='')
 
string getMessage ()
 
string getCode ()
 
array getArguments ()
 
string getTitle ()
 
string render ()
 
string __toString ()
 

Protected Attributes

string $message = 'Unknown message'
 
string $code
 
array $arguments = array( )
 
string $title = ''
 

Detailed Description

An object representation of a generic message. Usually, you will use Error, Warning or Notice instead of this one.

Definition at line 20 of file Message.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extbase\Error\Message::__construct (   $message,
  $code,
array  $arguments = [],
  $title = '' 
)

Constructs this error

Parameters
string$message‪An english error message which is used if no other error message can be resolved
int$code‪A unique error code
array$arguments‪Array of arguments to be replaced in message
string$title‪optional title for the message

Definition at line 54 of file Message.php.

References TYPO3\CMS\Extbase\Error\Message\$arguments, TYPO3\CMS\Extbase\Error\Message\$code, TYPO3\CMS\Extbase\Error\Message\$message, and TYPO3\CMS\Extbase\Error\Message\$title.

Member Function Documentation

◆ __toString()

string TYPO3\CMS\Extbase\Error\Message::__toString ( )

Converts this error into a string

Returns
‪string

Definition at line 120 of file Message.php.

References TYPO3\CMS\Extbase\Error\Message\render().

◆ getArguments()

array TYPO3\CMS\Extbase\Error\Message::getArguments ( )

Get arguments

Returns
‪array

Definition at line 87 of file Message.php.

References TYPO3\CMS\Extbase\Error\Message\$arguments.

◆ getCode()

string TYPO3\CMS\Extbase\Error\Message::getCode ( )

◆ getMessage()

string TYPO3\CMS\Extbase\Error\Message::getMessage ( )

Returns the error message

Returns
‪string The error message

Definition at line 67 of file Message.php.

References TYPO3\CMS\Extbase\Error\Message\$message.

Referenced by TYPO3\CMS\Form\Mvc\Property\Exception\TypeConverterException\fromError().

◆ getTitle()

string TYPO3\CMS\Extbase\Error\Message::getTitle ( )

Get title

Returns
‪string

Definition at line 97 of file Message.php.

References TYPO3\CMS\Extbase\Error\Message\$title.

◆ render()

string TYPO3\CMS\Extbase\Error\Message::render ( )

Return the rendered message

Returns
‪string

Definition at line 107 of file Message.php.

References TYPO3\CMS\Extbase\Error\Message\$message.

Referenced by TYPO3\CMS\Extbase\Error\Message\__toString().

Member Data Documentation

◆ $arguments

array TYPO3\CMS\Extbase\Error\Message::$arguments = array( )
protected

The message arguments. Will be replaced in the message body.

Definition at line 38 of file Message.php.

Referenced by TYPO3\CMS\Extbase\Error\Message\__construct(), and TYPO3\CMS\Extbase\Error\Message\getArguments().

◆ $code

string TYPO3\CMS\Extbase\Error\Message::$code
protected

The error code

Definition at line 32 of file Message.php.

Referenced by TYPO3\CMS\Extbase\Error\Message\__construct(), and TYPO3\CMS\Extbase\Error\Message\getCode().

◆ $message

string TYPO3\CMS\Extbase\Error\Message::$message = 'Unknown message'
protected

◆ $title

string TYPO3\CMS\Extbase\Error\Message::$title = ''
protected

An optional title for the message (used eg. in flashMessages).

Definition at line 44 of file Message.php.

Referenced by TYPO3\CMS\Extbase\Error\Message\__construct(), and TYPO3\CMS\Extbase\Error\Message\getTitle().