ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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  {
29  case 'Services/Object':
30  switch($a_event)
31  {
32  case 'toTrash':
33  include_once './Services/Object/classes/class.ilObjectLP.php';
34  $olp = ilObjectLP::getInstance($obj_id);
35  $olp->handleToTrash();
36  break;
37 
38  case 'delete':
39  // ilRepUtil will raise "delete" even if only reference was deleted!
40  $all_ref = ilObject::_getAllReferences($obj_id);
41  if(!sizeof($all_ref))
42  {
43  include_once './Services/Object/classes/class.ilObjectLP.php';
44  $olp = ilObjectLP::getInstance($obj_id);
45  $olp->handleDelete();
46  }
47  break;
48  }
49  break;
50 
51  case 'Services/Tree':
52  switch ($a_event)
53  {
54  case 'moveTree':
55  if($a_params['tree'] == 'tree')
56  {
57  include_once './Services/Object/classes/class.ilObjectLP.php';
58  ilObjectLP::handleMove($a_params['source_id']);
59  }
60  break;
61  }
62  break;
63  }
64 
65  return true;
66  }
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: