ILIAS  Release_4_1_x_branch Revision 61804
 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 "./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 
90  function initDefaultRoles()
91  {
92  global $rbacadmin;
93 
94  // create a local role folder
95  //$rfoldObj = $this->createRoleFolder("Local roles","Role Folder of forum obj_no.".$this->getId());
96 
97  // create moderator role and assign role to rolefolder...
98  //$roleObj = $rfoldObj->createRole("Moderator","Moderator of forum obj_no.".$this->getId());
99  //$roles[] = $roleObj->getId();
100 
101  //unset($rfoldObj);
102  //unset($roleObj);
103 
104  return $roles ? $roles : array();
105  }
106 
120  function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0)
121  {
122  global $tree;
123 
124  switch ($a_event)
125  {
126  case "link":
127 
128  //var_dump("<pre>",$a_params,"</pre>");
129  //echo "Module name ".$this->getRefId()." triggered by link event. Objects linked into target object ref_id: ".$a_ref_id;
130  //exit;
131  break;
132 
133  case "cut":
134 
135  //echo "Module name ".$this->getRefId()." triggered by cut event. Objects are removed from target object ref_id: ".$a_ref_id;
136  //exit;
137  break;
138 
139  case "copy":
140 
141  //var_dump("<pre>",$a_params,"</pre>");
142  //echo "Module name ".$this->getRefId()." triggered by copy event. Objects are copied into target object ref_id: ".$a_ref_id;
143  //exit;
144  break;
145 
146  case "paste":
147 
148  //echo "Module name ".$this->getRefId()." triggered by paste (cut) event. Objects are pasted into target object ref_id: ".$a_ref_id;
149  //exit;
150  break;
151 
152  case "new":
153 
154  //echo "Module name ".$this->getRefId()." triggered by paste (new) event. Objects are applied to target object ref_id: ".$a_ref_id;
155  //exit;
156  break;
157  }
158 
159  // At the beginning of the recursive process it avoids second call of the notify function with the same parameter
160  if ($a_node_id==$_GET["ref_id"])
161  {
162  $parent_obj =& $this->ilias->obj_factory->getInstanceByRefId($a_node_id);
163  $parent_type = $parent_obj->getType();
164  if($parent_type == $this->getType())
165  {
166  $a_node_id = (int) $tree->getParentId($a_node_id);
167  }
168  }
169 
170  parent::notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params);
171  }
172 }
173 ?>