Methods summary
public static
|
|
public static
AdministratorAlert
|
#
find_by_id( integer $alert_id )
Builds an alert knowing its id.
Builds an alert knowing its id.
Parameters
- $alert_id
- Id of the alert.
Returns
|
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.
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.
Parameters
- $id_in_module
- Id in the module.
- $type
- Alert type.
- $identifier
- Alert identifier.
Returns
|
public static
AdministratorAlert[]
|
#
get_unread_alerts( )
Builds a list of unread alerts.
Builds a list of unread alerts.
Returns
|
public static
AdministratorAlert[]
|
#
find_by_identifier( string $identifier, string $type = '' )
Finds an alert knowing its identifier and maybe its type.
Finds an alert knowing its identifier and maybe its type.
Parameters
- $identifier
- The identifier of the alerts you look for.
- $type
- The type of the alert you look for.
Returns
|
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.
Lists all the alerts of the site. You can order them. You can also choose how much alerts you want.
Parameters
- $criteria
The criteria according to which you want to order. It can be id, entitled, fixing_url,
current_status, creation_date, identifier, id_in_module, type, priority, description.
- $order
- asc or desc.
- $begin
- You want all the alert from the ($begin+1)(th).
- $number
- The number of alerts you want.
Returns
AdministratorAlerts[] The list of the alerts.
|
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.
Create or updates an alert in the database. It creates it whether it doesn't exist or updates it if it already exists.
Parameters
- $alert
- The alert to create or update.
|
public static
|
|
public static
integer
|
#
get_number_unread_alerts( )
Returns the number of unread alerts.
Returns the number of unread alerts.
Returns
integer The number of unread alerts.
|
public static
integer
|
#
get_number_alerts( )
Returns the number of alerts.
Returns the number of alerts.
Returns
integer The number of alerts.
|