ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjAccessibilitySettings.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once "./Services/Object/classes/class.ilObject.php";
5 
15 {
16 
23  function ilObjAccessibilitySettings($a_id = 0,$a_call_by_reference = true)
24  {
25  $this->type = "accs";
26  $this->ilObject($a_id,$a_call_by_reference);
27  }
28 
35  function update()
36  {
37  global $ilDB;
38 
39  if (!parent::update())
40  {
41  return false;
42  }
43 
44  return true;
45  }
46 
50  function read()
51  {
52  global $ilDB;
53 
54  parent::read();
55 
56  }
57 
58 
59 
60 
61 
68  function delete()
69  {
70  // always call parent delete function first!!
71  if (!parent::delete())
72  {
73  return false;
74  }
75 
76  //put here your module specific stuff
77 
78  return true;
79  }
80 
81 
95  function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0)
96  {
97  global $tree;
98 
99  switch ($a_event)
100  {
101  case "link":
102 
103  //var_dump("<pre>",$a_params,"</pre>");
104  //echo "Module name ".$this->getRefId()." triggered by link event. Objects linked into target object ref_id: ".$a_ref_id;
105  //exit;
106  break;
107 
108  case "cut":
109 
110  //echo "Module name ".$this->getRefId()." triggered by cut event. Objects are removed from target object ref_id: ".$a_ref_id;
111  //exit;
112  break;
113 
114  case "copy":
115 
116  //var_dump("<pre>",$a_params,"</pre>");
117  //echo "Module name ".$this->getRefId()." triggered by copy event. Objects are copied into target object ref_id: ".$a_ref_id;
118  //exit;
119  break;
120 
121  case "paste":
122 
123  //echo "Module name ".$this->getRefId()." triggered by paste (cut) event. Objects are pasted into target object ref_id: ".$a_ref_id;
124  //exit;
125  break;
126 
127  case "new":
128 
129  //echo "Module name ".$this->getRefId()." triggered by paste (new) event. Objects are applied to target object ref_id: ".$a_ref_id;
130  //exit;
131  break;
132  }
133 
134  // At the beginning of the recursive process it avoids second call of the notify function with the same parameter
135  if ($a_node_id==$_GET["ref_id"])
136  {
137  $parent_obj =& $this->ilias->obj_factory->getInstanceByRefId($a_node_id);
138  $parent_type = $parent_obj->getType();
139  if($parent_type == $this->getType())
140  {
141  $a_node_id = (int) $tree->getParentId($a_node_id);
142  }
143  }
144 
145  parent::notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params);
146  }
147 }
148 ?>