⚙ī¸getAlert()

Global function getAlert()

Messages can be displayed with the function getAlert(). Let's say you want to display the message "Your change has been successfully saved" in a green bar, then use the function as follows:

getAlert('Your change has been successfully saved')

You can also work with the language variables from the table "system_translations" as well as "custom_translations" here, or with your own sentences. If you want to use such a language variable, simply write:

getAlert('txtActivateThisUser')

You can also specify the color of the bar by adding one of the following attributes:

  • info (blue)

  • warning (orange)

  • danger (red)

  • success (default, green)

Example:

getAlert('alertErrorOccured', 'danger')

Without any attribute, green (success) is used by default.

Last updated