TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
AbstractStandaloneMessage Class Reference
Inheritance diagram for AbstractStandaloneMessage:
AbstractMessage ErrorpageMessage

Public Member Functions

 __construct ($message= '', $title= '', $severity=AbstractMessage::ERROR)
 
 setMarkers (array $markers)
 
 getHtmlTemplate ()
 
 setHtmlTemplate ($htmlTemplate)
 
 render ()
 
 output ()
 
- Public Member Functions inherited from AbstractMessage
 getTitle ()
 
 setTitle ($title)
 
 getMessage ()
 
 setMessage ($message)
 
 getSeverity ()
 
 setSeverity ($severity=self::OK)
 
 __toString ()
 

Protected Member Functions

 getDefaultMarkers ()
 

Protected Attributes

 $htmlTemplate
 
 $defaultMarkers = []
 
 $markers = []
 
- Protected Attributes inherited from AbstractMessage
 $title = ''
 
 $message = ''
 
 $severity = self::OK
 

Additional Inherited Members

- Public Attributes inherited from AbstractMessage
const NOTICE = -2
 
const INFO = -1
 
const OK = 0
 
const WARNING = 1
 
const ERROR = 2
 

Detailed Description

Abstract class as base for standalone messages (error pages etc.) This class is deprecated since TYPO3 v8 in favor of the ErrorPageController, and will be removed in TYPO3 v9

Definition at line 24 of file AbstractStandaloneMessage.php.

Constructor & Destructor Documentation

__construct (   $message = '',
  $title = '',
  $severity = AbstractMessage::ERROR 
)

Constructor

Parameters
string$messageMessage
string$titleTitle
int$severitySeverity, see class constants of AbstractMessage
Deprecated:
since TYPO3 v8, will be removed in TYPO3 v9, use the ErrorPageController instead

Definition at line 55 of file AbstractStandaloneMessage.php.

References AbstractMessage\$message, AbstractMessage\$severity, AbstractMessage\$title, GeneralUtility\logDeprecatedFunction(), AbstractMessage\setMessage(), AbstractMessage\setSeverity(), and AbstractMessage\setTitle().

Member Function Documentation

getDefaultMarkers ( )
protected

Returns the default markers like title and message, which exist for every standalone message

Returns
array

Definition at line 82 of file AbstractStandaloneMessage.php.

References AbstractStandaloneMessage\$defaultMarkers, AbstractMessage\$message, AbstractMessage\$severity, AbstractMessage\$title, and GeneralUtility\getIndpEnv().

Referenced by AbstractStandaloneMessage\render().

getHtmlTemplate ( )

Gets the filename of the HTML template.

Returns
string The filename of the HTML template.

Definition at line 110 of file AbstractStandaloneMessage.php.

References AbstractStandaloneMessage\$htmlTemplate.

output ( )

Renders the message and echoes it.

Returns
void

Definition at line 151 of file AbstractStandaloneMessage.php.

References AbstractStandaloneMessage\render().

render ( )

Renders the message.

Returns
string The message as HTML.

Definition at line 137 of file AbstractStandaloneMessage.php.

References AbstractStandaloneMessage\$markers, AbstractStandaloneMessage\getDefaultMarkers(), and GeneralUtility\makeInstance().

Referenced by AbstractStandaloneMessage\output().

setHtmlTemplate (   $htmlTemplate)

Sets the filename to the HTML template

Parameters
string$htmlTemplateThe filename of the HTML template, relative to PATH_site
Returns
void

Definition at line 124 of file AbstractStandaloneMessage.php.

References AbstractStandaloneMessage\$htmlTemplate.

Referenced by ErrorpageMessage\__construct().

setMarkers ( array  $markers)

Sets the markers of the templates, which have to be replaced with the specified contents. The marker array passed, will be merged with already present markers.

Parameters
array$markersArray containing the markers and values (e.g. ###MARKERNAME### => value)
Returns
void

Definition at line 72 of file AbstractStandaloneMessage.php.

Member Data Documentation

$defaultMarkers = []
protected
$markers = []
protected

Definition at line 45 of file AbstractStandaloneMessage.php.

Referenced by AbstractStandaloneMessage\render().