class SimpleMessage

Properties

string $level

The "level" of the notification (info, success, error).

string $subject

The subject of the notification.

string $greeting

The notification's greeting.

string $salutation

The notification's salutation.

array $introLines

The "intro" lines of the notification.

array $outroLines

The "outro" lines of the notification.

string $actionText

The text / label for the action.

string $actionUrl

The action URL.

Methods

$this
success()

Indicate that the notification gives information about a successful operation.

$this
error()

Indicate that the notification gives information about an error.

$this
level(string $level)

Set the "level" of the notification (success, error, etc.).

$this
subject(string $subject)

Set the subject of the notification.

$this
greeting(string $greeting)

Set the greeting of the notification.

$this
salutation(string $salutation)

Set the salutation of the notification.

$this
line(Action|string $line)

Add a line of text to the notification.

$this
with(Action|string|array $line)

Add a line of text to the notification.

string
formatLine(string|array $line)

Format the given line of text.

$this
action(string $text, string $url)

Configure the "call to action" button.

array
toArray()

Get an array representation of the message.

Details

at line 70
$this success()

Indicate that the notification gives information about a successful operation.

Return Value

$this

at line 82
$this error()

Indicate that the notification gives information about an error.

Return Value

$this

at line 95
$this level(string $level)

Set the "level" of the notification (success, error, etc.).

Parameters

string $level

Return Value

$this

at line 108
$this subject(string $subject)

Set the subject of the notification.

Parameters

string $subject

Return Value

$this

at line 121
$this greeting(string $greeting)

Set the greeting of the notification.

Parameters

string $greeting

Return Value

$this

at line 134
$this salutation(string $salutation)

Set the salutation of the notification.

Parameters

string $salutation

Return Value

$this

at line 147
$this line(Action|string $line)

Add a line of text to the notification.

Parameters

Action|string $line

Return Value

$this

at line 158
$this with(Action|string|array $line)

Add a line of text to the notification.

Parameters

Action|string|array $line

Return Value

$this

at line 177
protected string formatLine(string|array $line)

Format the given line of text.

Parameters

string|array $line

Return Value

string

at line 193
$this action(string $text, string $url)

Configure the "call to action" button.

Parameters

string $text
string $url

Return Value

$this

at line 206
array toArray()

Get an array representation of the message.

Return Value

array