events
Packages
Interfaces
Classes
Files

Class: AdministratorAlert

Source Location: /events/administrator_alert.class.php [line 56]

Class Overview

Event
   |
   --AdministratorAlert
This class represents an alert which must be sent to the administrator. It allows to the module developers to handle the administrator alerts. The administrator alerts can be in the administration panel and can be used when you want to signal an important event to the administrator(s).

Author(s):



Class Details

This class represents an alert which must be sent to the administrator. It allows to the module developers to handle the administrator alerts. The administrator alerts can be in the administration panel and can be used when you want to signal an important event to the administrator(s).

Tags:

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


Class Methods

constructor AdministratorAlert [line 61]

AdministratorAlert AdministratorAlert( )
Builds an AdministratorAlert object.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method build [line 81]

void build( int $id, string $entitled, string $properties, string $fixing_url, int $current_status, Date $creation_date, int $id_in_module, string $identifier, string $type, int $priority)
Builds an alert from its whole parameters.
Overrides Event::build() (Builds an event object from its whole parameters.)

Parameters:

int   $id   Identifier of the alert.
string   $entitled   Entitled of the alert.
string   $properties   Properties of the alert.
string   $fixing_url   Fixing url.
int   $current_status   Alert status.
Date   $creation_date   Alert creation date?
int   $id_in_module   Id in module field.
string   $identifier   Identifier of the alert.
string   $type   Type of the alert.
int   $priority   Priority of the alert.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_priority [line 99]

int get_priority( )
Gets the priority of the alert.

Tags:

  • return: One of those values:
    • ADMIN_ALERT_VERY_LOW_PRIORITY Very low priority
    • ADMIN_ALERT_LOW_PRIORITY Low priority
    • ADMIN_ALERT_MEDIUM_PRIORITY Medium priority
    • ADMIN_ALERT_HIGH_PRIORITY High priority
    • ADMIN_ALERT_VERY_HIGH_PRIORITY Very high priority
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_priority_name [line 154]

string get_priority_name( )
Gets the priority name. It's automatically translater to the user language, ready to be displayed.

Tags:

  • return: The priority name.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_properties [line 108]

string get_properties( )
Gets the alert properties.

Tags:

  • return: The properties.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_priority [line 124]

void set_priority( int $priority)
Sets the priority of the alert.

Parameters:

int   $priority   The priority, it must be one of those values:
  • ADMIN_ALERT_VERY_LOW_PRIORITY Very low priority
  • ADMIN_ALERT_LOW_PRIORITY Low priority
  • ADMIN_ALERT_MEDIUM_PRIORITY Medium priority
  • ADMIN_ALERT_HIGH_PRIORITY High priority
  • ADMIN_ALERT_VERY_HIGH_PRIORITY Very high priority
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_properties [line 141]

void set_properties( string $properties)
Sets the properties of the alert.

Parameters:

string   $properties   Properties.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Variables

[line 184]   int  $priority  =  ADMIN_ALERT_MEDIUM_PRIORITY

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 190]   string  $properties  =  ''

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

Inherited Methods

Class: Event

Event::Event()
Builds an Event object.
Event::build()
Builds an event object from its whole parameters.
Event::get_creation_date()
Returns the creation date of the event.
Event::get_entitled()
Returns the entitled of the event.
Event::get_fixing_url()
Returns the URL corresponding to the alert.
Event::get_id()
Gets the id of the event (in the event data base).
Event::get_identifier()
Gets the identifier of the event. To retrieve your event, you might need to have a field in which you put some informations, for example a hash or an identifier. It's that identifier which can be used to filter the events.
Event::get_id_in_module()
Gets the id in the module. This value corresponds to the id of the daba base entry associated to the event.
Event::get_must_regenerate_cache()
Gets the value indicating if the cache must be generated.
Event::get_status()
Gets the status of the event. The status is one of those elements: ul> <li>EVENT_STATUS_UNREAD if it's not read.</li> <li>EVENT_STATUS_BEING_PROCESSED if the event is beeing processed</li> <li>EVENT_STATUS_PROCESSED if the event is processed. </ul>
Event::get_status_name()
Gets the event status name. It's automatically translated in the user language.
Event::get_type()
Gets the type of the event. To retrieve your event, you might need to have a type of event, for example if your module has differents kinds of events. With this field, you can specify it.
Event::set_creation_date()
Sets the creation date of the event.
Event::set_entitled()
Sets the entitled of the event. The entitled can be considered as the name, it must be explicit.
Event::set_fixing_url()
Sets the URL corresponding to the event. For the contributions and the administrator alerts it's the number URL at which the problem can be solved.
Event::set_id()
Sets the id of the event. The id is the corresponding data base entry one.
Event::set_identifier()
Sets the event identifier. To retrieve your event, you might need to have a field in which you put some informations, for example a hash or an identifier. It's that identifier which can be used to filter the events. You don't have to use it, you can let it blank.
Event::set_id_in_module()
Sets the id in module parameter. It corresponds to the id of the element corresponding to the event in your data base tables. For example, il you use the events to allow user to purpose some news in your web site, it will be the id of the news added.
Event::set_must_regenerate_cache()
Sets a private property indicating if the changes made on this event imply the regeneration of the events cache.
Event::set_status()
Set the status of the event.
Event::set_type()
Sets the type of the event. To retrieve your event, you might need to have a type of event, for example if your module has differents kinds of events. With this field, you can specify it.


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