Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00037 require_once "class.ilContainerGUI.php";
00038 require_once "class.ilObjCategoryGUI.php";
00039
00040 class ilObjRootFolderGUI extends ilContainerGUI
00041 {
00046 function ilObjRootFolderGUI($a_data, $a_id, $a_call_by_reference = true, $a_prepare_output = true)
00047 {
00048 $this->type = "root";
00049 $this->ilContainerGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
00050 }
00051
00055 function importCategoriesFormObject ()
00056 {
00057 ilObjCategoryGUI::_importCategoriesForm($this->ref_id, $this->tpl);
00058 }
00059
00065 function importCancelledObject()
00066 {
00067 sendInfo($this->lng->txt("action_aborted"),true);
00068 $this->ctrl->returnToParent($this);
00069 }
00070
00074 function importCategoriesObject()
00075 {
00076 ilObjCategoryGUI::_importCategories($this->ref_id,0);
00077 }
00078
00079
00083 function importCategoriesWithRolObject()
00084 {
00085 ilObjCategoryGUI::_importCategories($this->ref_id,1);
00086 }
00087
00088
00089 function getTabs(&$tabs_gui)
00090 {
00091 global $rbacsystem;
00092
00093 $this->ctrl->setParameter($this,"ref_id",$this->ref_id);
00094
00095 if ($rbacsystem->checkAccess('read',$this->ref_id))
00096 {
00097 $tabs_gui->addTarget("view_content",
00098 $this->ctrl->getLinkTarget($this, ""),
00099 array("", "view", "render"));
00100 }
00101
00102
00103 parent::getTabs($tabs_gui);
00104
00105 }
00106
00107 function &executeCommand()
00108 {
00109 global $rbacsystem;
00110
00111 $next_class = $this->ctrl->getNextClass($this);
00112 $cmd = $this->ctrl->getCmd();
00113
00114 switch($next_class)
00115 {
00116 case 'ilcontainerlinklistgui':
00117 include_once("./classes/class.ilContainerLinkListGUI.php");
00118 $link_list_gui =& new ilContainerLinkListGUI();
00119 $ret =& $this->ctrl->forwardCommand($link_list_gui);
00120 break;
00121
00122
00123 case "ilpageobjectgui":
00124 $this->tpl->getStandardTemplate();
00125 $this->setLocator();
00126 sendInfo();
00127 infoPanel();
00128
00129 $ret = $this->forwardToPageObject();
00130 $this->setTitleAndDescription();
00131 $this->setPageEditorTabs();
00132 return $ret;
00133 break;
00134
00135 case 'ilpermissiongui':
00136 $this->prepareOutput();
00137 include_once("./classes/class.ilPermissionGUI.php");
00138 $perm_gui =& new ilPermissionGUI($this);
00139 $ret =& $this->ctrl->forwardCommand($perm_gui);
00140 break;
00141
00142 default:
00143 $this->prepareOutput();
00144 include_once("classes/class.ilObjStyleSheet.php");
00145 $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
00146 ilObjStyleSheet::getContentStylePath(0));
00147
00148 if(!$cmd)
00149 {
00150 $cmd = "render";
00151 }
00152
00153 $cmd .= "Object";
00154 $this->$cmd();
00155
00156 break;
00157 }
00158 return true;
00159 }
00160
00161
00165 function setTitleAndDescription()
00166 {
00167 global $lng;
00168
00169 $this->tpl->setTitle($lng->txt("repository"));
00170 $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_".$this->object->getType()."_b.gif"));
00171 }
00172
00173 }
00174 ?>