Summary
- File
- Package hierarchy PHPBoost
- Class hierarchy \AdministratorAlertService
__static()
None found |
find_by_id(integer $alert_id) : \AdministratorAlert
Builds an alert knowing its id.
integer | $alert_id | Id of the alert. |
The wanted alert. If it's not found, it returns null.
None found |
find_by_criteria(integer $id_in_module = null, string $type = null, string $identifier = null) : array<mixed,\AdministratorAlert>
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.
integer | $id_in_module | Id in the module. |
string | $type | Alert type. |
string | $identifier | Alert identifier. |
The list of the matching alerts.
None found |
get_unread_alerts() : array<mixed,\AdministratorAlert>
Builds a list of unread alerts.
The list of the matching alerts.
None found |
find_by_identifier(string $identifier, string $type = '') : array<mixed,\AdministratorAlert>
Finds an alert knowing its identifier and maybe its type.
string | $identifier | The identifier of the alerts you look for. |
string | $type | The type of the alert you look for. |
The list of the matching alerts.
None found |
get_all_alerts(string $criteria = 'creation_date', string $order = 'desc', integer $begin, integer $number = 20) : array<mixed,\AdministratorAlerts>
Lists all the alerts of the site. You can order them. You can also choose how much alerts you want.
string | $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. |
string | $order | asc or desc. |
integer | $begin | You want all the alert from the ($begin+1)(th). |
integer | $number | The number of alerts you want. |
The list of the alerts.
None found |
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.
\AdministratorAlert | $alert | The alert to create or update. |
None found |
delete_alert(\AdministratorAlert $alert)
Deletes an alert from the database.
\AdministratorAlert | $alert | The alert to delete. |
None found |
get_number_unread_alerts() : integer
Returns the number of unread alerts.
The number of unread alerts.
None found |
get_number_alerts() : integer
Returns the number of alerts.
The number of alerts.
None found |