32 include_once(
"./Services/UIComponent/Explorer/classes/class.ilExplorer.php");
33 include_once(
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php");
66 parent::__construct($a_target);
68 $this->root_id = $this->tree->readRootId();
69 $this->user_id = $a_user_id;
70 $this->allowed_types=
array (
'wfld',
'wsrt');
71 $this->enablesmallmode =
false;
81 $this->enablesmallmode = $a_enablesmallmode;
91 return $this->enablesmallmode;
103 function setOutput($a_parent, $a_depth = 1, $a_obj_id = 0, $a_highlighted_subtree =
false)
108 if ($objects = $this->tree->getChilds($a_parent,
"type DESC,title"))
110 $tab = ++$a_depth - 2;
112 foreach ($objects as $key => $object)
114 if (!in_array($object[
"type"],$this->allowed_types))
120 if ($object[
"child"] != $this->root_id)
123 $parent_index = $this->
getIndex($object);
126 $this->format_options[
"$counter"][
"parent"] = $object[
"parent"];
127 $this->format_options[
"$counter"][
"child"] = $object[
"child"];
128 $this->format_options[
"$counter"][
"title"] = $object[
"title"];
129 $this->format_options[
"$counter"][
"description"] = $object[
"description"];
130 $this->format_options[
"$counter"][
"type"] = $object[
"type"];
131 $this->format_options[
"$counter"][
"depth"] =
$tab;
132 $this->format_options[
"$counter"][
"container"] =
false;
133 $this->format_options[
"$counter"][
"visible"] =
true;
136 for ($i = 0; $i <
$tab; ++$i)
138 $this->format_options[
"$counter"][
"tab"][] =
'blank';
141 if ($object[
"child"] != $this->root_id
and (!in_array($object[
"parent"],$this->expanded)
142 or !$this->format_options[
"$parent_index"][
"visible"]))
144 $this->format_options[
"$counter"][
"visible"] =
false;
148 if ($object[
"child"] != $this->root_id)
150 $this->format_options[
"$parent_index"][
"container"] =
true;
152 if (in_array($object[
"parent"],$this->expanded))
154 $this->format_options[
"$parent_index"][
"tab"][($tab-2)] =
'minus';
158 $this->format_options[
"$parent_index"][
"tab"][($tab-2)] =
'plus';
165 $this->
setOutput($object[
"child"],$a_depth);
181 $title = $lng->txt(
"wsp_personal_workspace");
183 $tpl->setCurrentBlock(
"icon");
186 $tpl->parseCurrentBlock();
188 $tpl->setCurrentBlock(
"link");
194 if ($style_class !=
"")
196 $tpl->setVariable(
"A_CLASS",
' class="'.$style_class.
'" ' );
199 $tpl->parseCurrentBlock();
210 if ($a_node_id ==
"")
216 if(!is_array(
$_SESSION[$this->expand_variable]))
221 if($a_node_id > 0 && !in_array($a_node_id,
$_SESSION[$this->expand_variable]))
223 array_push(
$_SESSION[$this->expand_variable],$a_node_id);
228 $key = array_keys(
$_SESSION[$this->expand_variable],-(
int) $a_node_id);
229 unset(
$_SESSION[$this->expand_variable][$key[0]]);
244 $ilCtrl->setParameterByClass(
"ilobjworkspacerootfoldergui",
"wsp_id", $a_node_id);
245 return $ilCtrl->getLinkTargetByClass(
"ilobjworkspacerootfoldergui",
"");
248 $ilCtrl->setParameterByClass(
"ilobjworkspacefoldergui",
"wsp_id", $a_node_id);
249 return $ilCtrl->getLinkTargetByClass(
"ilobjworkspacefoldergui",
"");
271 $this->allowed_types = $a_types;
280 $this->show_details = $s_details;
289 if ($this->show_details==
'y' && !empty($a_desc))
304 return $lng->txt(
"icon").
" ".$lng->txt(
$a_type);
309 return sizeof($this->tree->getChildsByType($a_node_id,
"wfld"));
314 return $this->tree->getParentId($a_node_id);
321 $html = parent::getOutput();
322 $tpl->setBodyClass(
"std");
getNodeStyleClass($a_id, $a_type)
get style class for node
getEnableSmallMode()
Get Enable Small Mode.
buildFrameTarget($a_type, $a_child=0, $a_obj_id=0)
overwritten method from base class buid link target
getIndex($a_data)
get index of format_options array from specific ref_id,parent_id private
Tree handler for personal workspace.
setOutput($a_parent, $a_depth=1, $a_obj_id=0, $a_highlighted_subtree=false)
Overwritten method from class.Explorer.php to avoid checkAccess selects recursive method public...
formatHeader($tpl, $a_obj_id, $a_option)
overwritten method from base class public
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
setAllowedTypes($a_types)
set the alowed object types private
setExpand($a_node_id)
set the expand option this value is stored in a SESSION variable to save it different view (lo view...
buildDescription($a_desc, $a_id, $a_type)
overwritten method from base class buid decription
setShowDetails($s_details)
set details mode public
getImageAlt($a_def, $a_type="", $a_obj_id="")
Create styles array
The data for the language used.
Class ilExplorer class for explorer view in admin frame.
setEnableSmallMode($a_enablesmallmode)
Set Enable Small Mode.
buildLinkTarget($a_node_id, $a_type)
overwritten method from base class get link target
__construct($a_target, $a_user_id)
Constructor public.
getParentNode($a_node_id)