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

classes/class.ilObjRootFolder.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 
00024 
00035 require_once "class.ilObject.php";
00036 
00037 class ilObjRootFolder extends ilObject
00038 {
00045         function ilObjRootFolder($a_id,$a_call_by_reference = true)
00046         {
00047                 $this->type = "root";
00048                 $this->ilObject($a_id,$a_call_by_reference);
00049         }
00050 
00051 
00058         function ilClone($a_parent_ref)
00059         {               
00060                 // DISABLED
00061                 return false;
00062 
00063                 global $rbacadmin;
00064 
00065                 // always call parent ilClone function first!!
00066                 $new_ref_id = parent::ilClone($a_parent_ref);
00067                 
00068                 // put here rootfolder specific stuff
00069 
00070                 // ... and finally always return new reference ID!!
00071                 return $new_ref_id;
00072         }
00073 
00080         function delete()
00081         {               
00082                 // delete is disabled
00083 
00084                 $message = get_class($this)."::delete(): Can't delete root folder!";
00085                 $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
00086                 return false;
00087                 
00088                 // always call parent delete function first!!
00089                 if (!parent::delete())
00090                 {
00091                         return false;
00092                 }
00093                 
00094                 // put here rootfolder specific stuff
00095 
00096                 return true;;
00097         }
00098 
00109         function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0)
00110         {
00111                 global $tree;
00112                 
00113                 switch ($a_event)
00114                 {
00115                         case "link":
00116                                 
00117                                 //var_dump("<pre>",$a_params,"</pre>");
00118                                 //echo "RootFolder ".$this->getRefId()." triggered by link event. Objects linked into target object ref_id: ".$a_ref_id;
00119                                 //exit;
00120                                 break;
00121                         
00122                         case "cut":
00123                                 
00124                                 //echo "RootFolder ".$this->getRefId()." triggered by cut event. Objects are removed from target object ref_id: ".$a_ref_id;
00125                                 //exit;
00126                                 break;
00127                                 
00128                         case "copy":
00129                         
00130                                 //var_dump("<pre>",$a_params,"</pre>");
00131                                 //echo "RootFolder ".$this->getRefId()." triggered by copy event. Objects are copied into target object ref_id: ".$a_ref_id;
00132                                 //exit;
00133                                 break;
00134 
00135                         case "paste":
00136                                 
00137                                 //echo "RootFolder ".$this->getRefId()." triggered by paste (cut) event. Objects are pasted into target object ref_id: ".$a_ref_id;
00138                                 //exit;
00139                                 break;
00140                         
00141                         case "new":
00142                                 
00143                                 //echo "RootFolder ".$this->getRefId()." triggered by paste (new) event. Objects are applied to target object ref_id: ".$a_ref_id;
00144                                 //exit;
00145                                 break;
00146                 }
00147                 
00148                 
00149                 return true;
00150         }
00151 } // END class.ObjRootFolder
00152 ?>

Generated on Fri Dec 13 2013 09:06:34 for ILIAS Release_3_4_x_branch .rev 46804 by  doxygen 1.7.1