• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

classes/class.ilObjExternalToolsSettings.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003         +-----------------------------------------------------------------------------+
00004         | ILIAS open source                                                           |
00005         +-----------------------------------------------------------------------------+
00006         | Copyright (c) 1998-2001 ILIAS open source, University of Cologne            |
00007         |                                                                             |
00008         | This program is free software; you can redistribute it and/or               |
00009         | modify it under the terms of the GNU General Public License                 |
00010         | as published by the Free Software Foundation; either version 2              |
00011         | of the License, or (at your option) any later version.                      |
00012         |                                                                             |
00013         | This program is distributed in the hope that it will be useful,             |
00014         | but WITHOUT ANY WARRANTY; without even the implied warranty of              |
00015         | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
00016         | GNU General Public License for more details.                                |
00017         |                                                                             |
00018         | You should have received a copy of the GNU General Public License           |
00019         | along with this program; if not, write to the Free Software                 |
00020         | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
00021         +-----------------------------------------------------------------------------+
00022 */
00023 
00033 require_once "class.ilObject.php";
00034 
00035 class ilObjExternalToolsSettings extends ilObject
00036 {
00043         function ilObjExternalToolsSettings($a_id = 0,$a_call_by_reference = true)
00044         {
00045                 $this->type = "extt";
00046                 $this->ilObject($a_id,$a_call_by_reference);
00047         }
00048 
00055         function update()
00056         {
00057                 if (!parent::update())
00058                 {                       
00059                         return false;
00060                 }
00061 
00062                 // put here object specific stuff
00063                 
00064                 return true;
00065         }
00066         
00067 
00074         function delete()
00075         {               
00076                 // always call parent delete function first!!
00077                 if (!parent::delete())
00078                 {
00079                         return false;
00080                 }
00081                 
00082                 //put here your module specific stuff
00083                 
00084                 return true;
00085         }
00086 
00096         function initDefaultRoles()
00097         {
00098                 global $rbacadmin;
00099                 
00100                 // create a local role folder
00101                 //$rfoldObj = $this->createRoleFolder("Local roles","Role Folder of forum obj_no.".$this->getId());
00102 
00103                 // create moderator role and assign role to rolefolder...
00104                 //$roleObj = $rfoldObj->createRole("Moderator","Moderator of forum obj_no.".$this->getId());
00105                 //$roles[] = $roleObj->getId();
00106 
00107                 //unset($rfoldObj);
00108                 //unset($roleObj);
00109 
00110                 return $roles ? $roles : array();
00111         }
00112 
00126         function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0)
00127         {
00128                 global $tree;
00129                 
00130                 switch ($a_event)
00131                 {
00132                         case "link":
00133                                 
00134                                 //var_dump("<pre>",$a_params,"</pre>");
00135                                 //echo "Module name ".$this->getRefId()." triggered by link event. Objects linked into target object ref_id: ".$a_ref_id;
00136                                 //exit;
00137                                 break;
00138                         
00139                         case "cut":
00140                                 
00141                                 //echo "Module name ".$this->getRefId()." triggered by cut event. Objects are removed from target object ref_id: ".$a_ref_id;
00142                                 //exit;
00143                                 break;
00144                                 
00145                         case "copy":
00146                         
00147                                 //var_dump("<pre>",$a_params,"</pre>");
00148                                 //echo "Module name ".$this->getRefId()." triggered by copy event. Objects are copied into target object ref_id: ".$a_ref_id;
00149                                 //exit;
00150                                 break;
00151 
00152                         case "paste":
00153                                 
00154                                 //echo "Module name ".$this->getRefId()." triggered by paste (cut) event. Objects are pasted into target object ref_id: ".$a_ref_id;
00155                                 //exit;
00156                                 break;
00157                         
00158                         case "new":
00159                                 
00160                                 //echo "Module name ".$this->getRefId()." triggered by paste (new) event. Objects are applied to target object ref_id: ".$a_ref_id;
00161                                 //exit;
00162                                 break;
00163                 }
00164                 
00165                 // At the beginning of the recursive process it avoids second call of the notify function with the same parameter
00166                 if ($a_node_id==$_GET["ref_id"])
00167                 {       
00168                         $parent_obj =& $this->ilias->obj_factory->getInstanceByRefId($a_node_id);
00169                         $parent_type = $parent_obj->getType();
00170                         if($parent_type == $this->getType())
00171                         {
00172                                 $a_node_id = (int) $tree->getParentId($a_node_id);
00173                         }
00174                 }
00175                 
00176                 parent::notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params);
00177         }
00178 } // END class.ilObjExternalToolsSettings
00179 ?>

Generated on Fri Dec 13 2013 17:56:47 for ILIAS Release_3_9_x_branch .rev 46835 by  doxygen 1.7.1