events
Packages
Interfaces
Classes
Files

Class: AdministratorAlertService

Source Location: /events/administrator_alert_service.class.php [line 39]

Class Overview


This static class allows you to handler easily the administrator alerts which can be made in PHPBoost.

Author(s):



Class Details

This static class allows you to handler easily the administrator alerts which can be made in PHPBoost.

Tags:

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Methods

method delete_alert [line 228]

void delete_alert( &$alert, AdministratorAlert $alert)
Deletes an alert from the database.

Parameters:

AdministratorAlert   $alert   The alert to delete.
   &$alert  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

static method compute_number_unread_alerts [line 251]

static int[] compute_number_unread_alerts( )
Counts the number of unread alerts.

Tags:

  • return: An associative map:
    • unread => the number of the unread alerts
    • all => the number of all the alerts of the site
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

static method find_by_criteria [line 81]

static AdministratorAlert[] find_by_criteria( [int $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.

Tags:

  • return: The list of the matching alerts.

Parameters:

int   $id_in_module   Id in the module.
string   $type   Alert type.
string   $identifier   Alert identifier.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

static method find_by_id [line 47]

static AdministratorAlert find_by_id( int $alert_id)
Builds an alert knowing its id.

Tags:

  • return: The wanted alert. If it's not found, it returns null.

Parameters:

int   $alert_id   Id of the alert.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

static method find_by_identifier [line 133]

static AdministratorAlert[] find_by_identifier( string $identifier, [string $type = ''])
Finds an alert knowing its identifier and maybe its type.

Tags:

  • return: The list of the matching alerts.

Parameters:

string   $identifier   The identifier of the alerts you look for.
string   $type   The type of the alert you look for.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

static method get_all_alerts [line 165]

static AdministratorAlerts[] get_all_alerts( [string $criteria = 'creation_date'], [string $order = 'desc'], [int $begin = 0], [int $number = 20])
Lists all the alerts of the site. You can order them. You can also choose how much alerts you want.

Tags:

  • return: The list of the alerts.

Parameters:

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.
int   $begin   You want all the alert from the ($begin+1)(th).
int   $number   The number of alerts you want.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

static method get_number_alerts [line 276]

static int get_number_alerts( )
Returns the number of alerts.

Tags:

  • return: The number of alerts.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

static method get_number_unread_alerts [line 265]

static int get_number_unread_alerts( )
Returns the number of unread alerts.

Tags:

  • return: The number of unread alerts.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

static method save_alert [line 194]

static void save_alert( &$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.

Parameters:

AdministratorAlert   $alert   The alert to create or update.
   &$alert  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

Documentation generated on Tue, 28 Jul 2009 22:43:33 +0200 by phpDocumentor 1.4.1