SimpleMessage
class SimpleMessage (View source)
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
Indicate that the notification gives information about a successful operation.
Indicate that the notification gives information about an error.
Set the "level" of the notification (success, error, etc.).
Set the subject of the notification.
Set the greeting of the notification.
Set the salutation of the notification.
Add a line of text to the notification.
Add a line of text to the notification.
Configure the "call to action" button.
Get an array representation of the message.
Details
$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(mixed $line)
Add a line of text to the notification.
$this
with(mixed $line)
Add a line of text to the notification.
$this
action(string $text, string $url)
Configure the "call to action" button.
array
toArray()
Get an array representation of the message.