public class Alert

class.alert.php #11

The Alert class drives the standard Symphony notices that appear at the top of the backend pages to alert the user of something. Their are three default alert styles, notice, error and success.

Constants

public static
class.alert.php #27
static string ERROR = 'error'

Represents an error, used when something has gone wrong during the previous action. It is blocking, in that the action has not completed successfully.

public static
class.alert.php #19
static string NOTICE = 'notice'

Represents a notice, usually used for non blocking alerts, just to inform that user that something has happened and they need to aware of it

public static
class.alert.php #34
static string SUCCESS = 'success'

Represents success, used when an action has completed successfully with no errors

Methods

void __construct(string $message, string $type)

Constructor for the Alert class initialises some default variables

Parameters
  • $message stringThis text will be displayed to the user

  • $type stringThe type of alert this is. Defaults to NOTICE, available values are Alert::NOTICE, Alert::ERROR, Alert::SUCCESS

string __get(string $name)

Magic accessor function to get the private variables from an Alert instance

Parameters
  • $name stringThe name of the variable, message or type are the valid values

boolean __isset(string $name)

Magic isset function to check if a variable is set by ensuring it's not null

Parameters
  • $name stringThe name of the variable to check, message or type are the valid values

Returns

true when set, false when not set.

void __set(string $name, string $value)

Magic setter function to set the private variables of an Alert instance

Parameters
  • $name stringThe name of the variable, message or type are the valid values

  • $value stringThe value of the variable that is being set

XMLElement asXML()

Generates as XMLElement representation of this Alert

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details