ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilTrackingAppEventListener Class Reference

Update lp data from Services/Object events. More...

+ Inheritance diagram for ilTrackingAppEventListener:
+ Collaboration diagram for ilTrackingAppEventListener:

Static Public Member Functions

static handleEvent ($a_component, $a_event, $a_params)
 Handle an event in a listener. More...
 

Detailed Description

Update lp data from Services/Object events.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 14 of file class.ilTrackingAppEventListener.php.

Member Function Documentation

◆ handleEvent()

static ilTrackingAppEventListener::handleEvent (   $a_component,
  $a_event,
  $a_params 
)
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 23 of file class.ilTrackingAppEventListener.php.

References ilObject\_getAllReferences(), ilObjectLP\getInstance(), and ilObjectLP\handleMove().

24  {
25  $obj_id = $a_params['obj_id'];
26 
27  switch ($a_component) {
28  case 'Services/Object':
29  switch ($a_event) {
30  case 'toTrash':
31  include_once './Services/Object/classes/class.ilObjectLP.php';
32  $olp = ilObjectLP::getInstance($obj_id);
33  $olp->handleToTrash();
34  break;
35 
36  case 'delete':
37  // ilRepUtil will raise "delete" even if only reference was deleted!
38  $all_ref = ilObject::_getAllReferences($obj_id);
39  if (!sizeof($all_ref)) {
40  include_once './Services/Object/classes/class.ilObjectLP.php';
41  $olp = ilObjectLP::getInstance($obj_id);
42  $olp->handleDelete();
43  }
44  break;
45  }
46  break;
47 
48  case 'Services/Tree':
49  switch ($a_event) {
50  case 'moveTree':
51  if ($a_params['tree'] == 'tree') {
52  include_once './Services/Object/classes/class.ilObjectLP.php';
53  ilObjectLP::handleMove($a_params['source_id']);
54  }
55  break;
56  }
57  break;
58  }
59 
60  return true;
61  }
static _getAllReferences($a_id)
get all reference ids of object
static handleMove($a_source_ref_id)
static getInstance($a_obj_id)
+ Here is the call graph for this function:

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