Package: PHPBoost\Event Copyright: © 2005-2019 PHPBoost License: GNU/GPL-3.0 Author: Benoit SAUTEL Version: PHPBoost 5.2 - last update: 2019 03 26 Since: PHPBoost 2.0 - 2008 08 29 Contributor: mipel Contributor: Julien BRISWALTER Contributor: Arnaud GENET Located at: phpboost/event/AdministratorAlertService.class.php
Methods summary
public static
# __static( )
public static AdministratorAlert
# find_by_id( integer $alert_id )

Builds an alert knowing its id.

public static AdministratorAlert[]
# find_by_criteria( integer $id_in_module = null, string $type = null, string $identifier = null )

Builds a list of alerts matching the required criteria(s). You can specify many criterias. When you use several of them, it's a AND condition. It will only return the alert which match all the criterias.

public static AdministratorAlert[]
# get_unread_alerts( )

Builds a list of unread alerts.

public static AdministratorAlert[]
# find_by_identifier( string $identifier, string $type = '' )

Finds an alert knowing its identifier and maybe its type.

public static AdministratorAlerts[]
# get_all_alerts( string $criteria = 'creation_date', string $order = 'desc', integer $begin = 0, integer $number = 20 )

Lists all the alerts of the site. You can order them. You can also choose how much alerts you want.

public static
# save_alert( AdministratorAlert $alert )

Create or updates an alert in the database. It creates it whether it doesn't exist or updates it if it already exists.

public static
# delete_alert( AdministratorAlert $alert )

Deletes an alert from the database.

public static integer
# get_number_unread_alerts( )

Returns the number of unread alerts.

public static integer
# get_number_alerts( )

Returns the number of alerts.