Alert
A user level alert
Alerts are intended to be displayed in the product as quick notifications generated on the fly for WHMCS users. Clients will be able to view alerts in the client area from the notification widget in the top right corner.
class
Alert
Properties summary
Type | Property | Description | |
---|---|---|---|
protected | $message | An alert's message. | |
protected | $severity | An alert's severity. | |
protected | $link | An optional link target to provide along with an alert. | |
protected | $linkText | An optional link text to provide along with an alert. |
Methods summary
Return Type | Method Name | Description | |
---|---|---|---|
__construct(string $message, string $severity = 'info', string $link = null, string $linkText = null) | Build a new user alert. | ||
string | getMessage() | Retrieve an alert's message. | |
Alert | setMessage(string $message) | Set an alert's message. | |
string | getSeverity() | Retrieve an alert's severity. | |
Alert | setSeverity(string $severity = 'info') | Set an alert's severity. | |
string | getLink() | Retrieve an optional link target to provide along with an alert. | |
Alert | setLink(string $link) | Set an optional link target to provide along with an alert. | |
string | getLinkText() | Retrieve an optional link text to provide along with an alert. | |
Alert | setLinkText(string $linkText) | Set an optional link text to provide along with an alert. |
Details
__construct (string $message, string $severity = 'info', string $link = null, string $linkText = null)
Build a new user alert.
string
getMessage ()
Retrieve an alert's message.
protected Alert
setMessage (string $message)
Set an alert's message.
string
getSeverity ()
Retrieve an alert's severity.
protected Alert
setSeverity (string $severity = 'info')
Set an alert's severity.
string
getLink ()
Retrieve an optional link target to provide along with an alert.
protected Alert
setLink (string $link)
Set an optional link target to provide along with an alert.
string
getLinkText ()
Retrieve an optional link text to provide along with an alert.
protected Alert
setLinkText (string $linkText)
Set an optional link text to provide along with an alert.