ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilContactAppEventListener Class Reference

Class ilContactAppEventListener. More...

+ Inheritance diagram for ilContactAppEventListener:
+ Collaboration diagram for ilContactAppEventListener:

Static Public Member Functions

static handleEvent ($a_component, $a_event, $a_parameter)
 {Handle an event in a listener.
Parameters
string$a_componentcomponent, e.g. "Modules/Forum" or "Services/User"
string$a_eventevent e.g. "createUser", "updateUser", "deleteUser", ...
array$a_parameterparameter array (assoc), array("name" => ..., "phone_office" => ...)
} More...
 

Detailed Description

Member Function Documentation

◆ handleEvent()

static ilContactAppEventListener::handleEvent (   $a_component,
  $a_event,
  $a_parameter 
)
static

{Handle an event in a listener.

Parameters
string$a_componentcomponent, e.g. "Modules/Forum" or "Services/User"
string$a_eventevent e.g. "createUser", "updateUser", "deleteUser", ...
array$a_parameterparameter array (assoc), array("name" => ..., "phone_office" => ...)
}

Implements ilAppEventListener.

Definition at line 15 of file class.ilContactAppEventListener.php.

References $DIC, array, ilBuddyList\getInstanceByUserId(), and ilBuddySystemNotification\setRecipientIds().

16  {
17  global $DIC;
18 
19  if('Services/User' == $a_component && 'deleteUser' == $a_event)
20  {
21  require_once 'Services/Contact/BuddySystem/classes/class.ilBuddyList.php';
22  ilBuddyList::getInstanceByUserId($a_parameter['usr_id'])->destroy();
23 
24  require_once 'Services/Contact/classes/class.ilMailingList.php';
25  ilMailingList::removeAssignmentsByUserId($a_parameter['usr_id']);
26  }
27 
28  if('Services/Contact' == $a_component && 'contactRequested' == $a_event)
29  {
30  require_once 'Services/Contact/BuddySystem/classes/class.ilBuddySystemNotification.php';
31  $notification = new ilBuddySystemNotification($DIC->user());
32  $notification->setRecipientIds(array($a_parameter['usr_id']));
33  $notification->send();
34  }
35  }
static getInstanceByUserId($usr_id)
Create styles array
The data for the language used.
global $DIC
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: