FORMfields


FORMfields.FfMessageHelper

Class FfMessageHelper

FfMessageHelper

public class FfMessageHelper

FfMessageHelper is a helper class that uses a small FfForm to create message dialogs/windows for errors, warnings, information and questions.

Since:
FORMfields v3.0

Field Summary
mixed

$ffForm

An internal FfForm used for processing button presses in the message window.

mixed

$message

The message clear text or HTML.

mixed

$showBorder

True if section header CSS wrappers should be displayed.

Constructor Summary

FfMessageHelper(string message, boolean showCancel, boolean showOk, boolean showBorder)

Creates a new FfMessageHelper.

__construct(string message, boolean showCancel, boolean showOk, boolean showBorder)

Creates a new FfMessageHelper.

Method Summary
the

getError()

Returns the HTML to display this message window as an error.

void

getErrorMessage(mixed message)

A static method that returns the HTML needed to display a basic error message with no buttons.

the

getInfo()

Returns the HTML to display this message window as a information

void

getInfoMessage(mixed message)

A static method that returns the HTML needed to display a basic info message with no buttons.

string

getMessage(string altString, string messageClass, string sectionClass)

Returns HTML to display this message window.

the

getQuestion()

Returns the HTML to display this message window as a question

void

getQuestionMessage(mixed message)

A static method that returns the HTML needed to display a basic question message with no buttons.

the

getWarning()

Returns the HTML to display this message window as a warning

void

getWarningMessage(mixed message)

A static method that returns the HTML needed to display a basic warning message with no buttons.

void

printError()

Echos the HTML to display this message window as an error.

void

printInfo()

Echos the HTML to display this message window as a information.

void

printMessage(mixed iconPath, string altString, string messageClass, string sectionClass)

Echos the HTML to display this message window.

void

printQuestion()

Echos the HTML to display this message window as a question.

void

printWarning()

Echos the HTML to display this message window as a warning.

Field Detail

ffForm

public mixed $ffForm = null

An internal FfForm used for processing button presses in the message window.

Since:
FORMfields v3.0

message

public mixed $message = null

The message clear text or HTML.

Since:
FORMfields v3.0

showBorder

public mixed $showBorder = true

True if section header CSS wrappers should be displayed.

See Also:
FORMfields.FfMenuHelper
Since:
FORMfields v3.0

Constructor Detail

FfMessageHelper

public FfMessageHelper(string message, boolean showCancel, boolean showOk, boolean showBorder)

Creates a new FfMessageHelper.

Parameters:
message - the message clear text or HTML
showCancel - true or null if the Cancel button should be displayed
showOk - true or null if the Ok button should be displayed
showBorder - true or null if section header CSS wrappers should be displayed
See Also:
FORMfields.FfMenuHelper
Since:
FORMfields v3.0
Deprecated:
deprecated as this constructor syntax is not expected in PHP 5 - will be removed once PHP 5 becomes a minimum requirement for FORMfields

__construct

public __construct(string message, boolean showCancel, boolean showOk, boolean showBorder)

Creates a new FfMessageHelper.

Parameters:
message - the message clear text or HTML
showCancel - true or null if the Cancel button should be displayed
showOk - true or null if the Ok button should be displayed
showBorder - true or null if section header CSS wrappers should be displayed
See Also:
FORMfields.FfMenuHelper
Since:
FORMfields v3.0

Method Detail

getError

public the getError()

Returns the HTML to display this message window as an error.

Returns:
HTML to display this message window as an error
Since:
FORMfields v3.0

getErrorMessage

public void getErrorMessage(mixed message)

A static method that returns the HTML needed to display a basic error message with no buttons.

Since:
FORMfields v3.0

getInfo

public the getInfo()

Returns the HTML to display this message window as a information

Returns:
HTML to display this message window as a information
Since:
FORMfields v3.0

getInfoMessage

public void getInfoMessage(mixed message)

A static method that returns the HTML needed to display a basic info message with no buttons.

Since:
FORMfields v3.0

getMessage

public string getMessage(string altString, string messageClass, string sectionClass)

Returns HTML to display this message window.

Parameters:
altString - the value of the alt attribute in the image tag of the message icon
messageClass - the CSS class for the message type
sectionClass - the CSS class for the message window or null for ffRoundedBox
Returns:
the HTML to display this message window
Since:
FORMfields v3.0

getQuestion

public the getQuestion()

Returns the HTML to display this message window as a question

Returns:
HTML to display this message window as a question
Since:
FORMfields v3.0

getQuestionMessage

public void getQuestionMessage(mixed message)

A static method that returns the HTML needed to display a basic question message with no buttons.

Since:
FORMfields v3.0

getWarning

public the getWarning()

Returns the HTML to display this message window as a warning

Returns:
HTML to display this message window as a warning
Since:
FORMfields v3.0

getWarningMessage

public void getWarningMessage(mixed message)

A static method that returns the HTML needed to display a basic warning message with no buttons.

Since:
FORMfields v3.0

printError

public void printError()

Echos the HTML to display this message window as an error.

Since:
FORMfields v3.0

printInfo

public void printInfo()

Echos the HTML to display this message window as a information.

Since:
FORMfields v3.0

printMessage

public void printMessage(mixed iconPath, string altString, string messageClass, string sectionClass)

Echos the HTML to display this message window.

Parameters:
altString - the value of the alt attribute in the image tag of the message icon
messageClass - the CSS class for the message type
sectionClass - the CSS class for the message window or null for ffRoundedBox
Since:
FORMfields v3.0

printQuestion

public void printQuestion()

Echos the HTML to display this message window as a question.

Since:
FORMfields v3.0

printWarning

public void printWarning()

Echos the HTML to display this message window as a warning.

Since:
FORMfields v3.0

FORMfields