ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilContactAppEventListener Class Reference

Class ilContactAppEventListener. More...

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

Static Public Member Functions

static handleEvent (string $a_component, string $a_event, array $a_parameter)
 

Detailed Description

Member Function Documentation

◆ handleEvent()

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

Implements ilAppEventListener.

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

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

30  : void
31  {
32  global $DIC;
33 
34  if ('components/ILIAS/User' === $a_component && 'deleteUser' === $a_event) {
35  ilBuddyList::getInstanceByUserId((int) $a_parameter['usr_id'])->destroy();
36  $user = new ilObjUser();
37  $user->setId((int) $a_parameter['usr_id']);
38 
39  $mailingLists = new ilMailingLists($user);
40  $mailingLists->deleteLists();
41  $mailingLists->deleteAssignments();
42  }
43 
44  if ('components/ILIAS/Contact' === $a_component && 'contactRequested' === $a_event) {
45  $notification = new ilBuddySystemNotification($DIC->user(), $DIC->settings());
46  $notification->setRecipientIds([(int) $a_parameter['usr_id']]);
47  $notification->send();
48  }
49  }
static getInstanceByUserId(int $usrId)
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

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