status.inc
LDAP Account Manager status messages.
Tags
Table of Contents
- StatusMessage() : string
- This function prints a short status message. It can be used to print INFO, WARN and ERROR messages at the moment.
- parseMessageString() : string
- Use the three replace functions on the submitted Text.
- boldText() : string
- Replace {bold} and {endbold} with <b> and </b> HTML-Tags.
- colorText() : string
- Replace {color=#[HEX-Value]} or {color=[HEX-Value]} and {endcolor} with <font color="#[HEX-Value]"> and </font> HTML-Tags.
- linkText() : string
- Replace {link=[Link-Target]} and {endlink} with <a href="[Link-Target]" target="_blank"> and </a> HTML-Tags.
Functions
StatusMessage()
This function prints a short status message. It can be used to print INFO, WARN and ERROR messages at the moment.
StatusMessage(string $MessageTyp, string $MessageHeadline[, string $MessageText = '' ][, array<string|int, mixed> $MessageVariables = array() ][, bool $returnOutput = false ]) : string
The headline and text may be formatted with special tags:
{bold}, {endbold}: All text between these tags is printed bold.
{color=#123456}, {endcolor}: All text between these tags is printed in the given color.
{link=http://nodomain.org}, {endlink}: A link with the given target is created. The link text is the text between the tags.
Parameters
- $MessageTyp : string
-
The type of the message to be printed. It must be one of the following types: 'INFO', 'WARN' or 'ERROR'.
Every other type will lead to an error message indicating an invalid message type. - $MessageHeadline : string
-
The headline of the status message.
It may be formatted with special color/link/bold tags. - $MessageText : string = ''
-
The text of the status message.
It may be formatted with special color/link/bold tags. This parameter is optional. - $MessageVariables : array<string|int, mixed> = array()
-
The variables that are used to replace the spacers (%s) in the submitted text. This parameter is optional.
- $returnOutput : bool = false
-
if set to true this function will return the generated HTML code instead of printing it directly (default: false)
Return values
string —HTML code if $returnOutput is set to true, otherwise null
parseMessageString()
Use the three replace functions on the submitted Text.
parseMessageString(string $MessageString) : string
Parameters
- $MessageString : string
-
The text that is used to search for replaceable strings.
Tags
Return values
string —The processed text.
boldText()
Replace {bold} and {endbold} with <b> and </b> HTML-Tags.
boldText(string $text) : string
Parameters
- $text : string
-
The text that is used to search for {bold} and {endbold} tags.
Tags
Return values
string —The submitted text with {bold} and {endbold} replaced with the appropriate HTML tags and
colorText()
Replace {color=#[HEX-Value]} or {color=[HEX-Value]} and {endcolor} with <font color="#[HEX-Value]"> and </font> HTML-Tags.
colorText(string $text) : string
Parameters
- $text : string
-
The text that is used to search for {color} and {endcolor} tags.
Tags
Return values
string —Input string with HTML-formatted color tags
linkText()
Replace {link=[Link-Target]} and {endlink} with <a href="[Link-Target]" target="_blank"> and </a> HTML-Tags.
linkText(string $text) : string
Parameters
- $text : string
-
The text that is used to search for {link} and {endlink} tags.
Tags
Return values
string —Input string with HTML-formatted link tags