32include_once(
"./Services/UIComponent/Explorer/classes/class.ilExplorer.php");
 
   33include_once(
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php");
 
   73        $this->lng = 
$DIC->language();
 
   74        $this->ctrl = 
$DIC->ctrl();
 
   75        $this->tpl = 
$DIC[
"tpl"];
 
   76        parent::__construct($a_target);
 
   78        $this->root_id = $this->tree->readRootId();
 
   79        $this->user_id = $a_user_id;
 
   80        $this->allowed_types = array(
'wfld', 
'wsrt');
 
   81        $this->enablesmallmode = 
false;
 
   91        $this->enablesmallmode = $a_enablesmallmode;
 
  101        return $this->enablesmallmode;
 
  113    public function setOutput($a_parent, $a_depth = 1, $a_obj_id = 0, $a_highlighted_subtree = 
false)
 
  118        if ($objects = $this->tree->getChilds($a_parent, 
"type DESC,title")) {
 
  119            $tab = ++$a_depth - 2;
 
  121            foreach ($objects as 
$key => $object) {
 
  122                if (!in_array($object[
"type"], $this->allowed_types)) {
 
  127                if ($object[
"child"] != $this->root_id) {
 
  129                    $parent_index = $this->
getIndex($object);
 
  132                $this->format_options[
"$counter"][
"parent"] = $object[
"parent"];
 
  133                $this->format_options[
"$counter"][
"child"] = $object[
"child"];
 
  134                $this->format_options[
"$counter"][
"title"] = $object[
"title"];
 
  135                $this->format_options[
"$counter"][
"description"] = $object[
"description"];
 
  136                $this->format_options[
"$counter"][
"type"] = $object[
"type"];
 
  137                $this->format_options[
"$counter"][
"depth"] = 
$tab;
 
  138                $this->format_options[
"$counter"][
"container"] = 
false;
 
  139                $this->format_options[
"$counter"][
"visible"] = 
true;
 
  143                    $this->format_options[
"$counter"][
"tab"][] = 
'blank';
 
  146                if ($object[
"child"] != $this->root_id and (!in_array($object[
"parent"], $this->expanded)
 
  147                                                          or !$this->format_options[
"$parent_index"][
"visible"])) {
 
  148                    $this->format_options[
"$counter"][
"visible"] = 
false;
 
  152                if ($object[
"child"] != $this->root_id) {
 
  153                    $this->format_options[
"$parent_index"][
"container"] = 
true;
 
  155                    if (in_array($object[
"parent"], $this->expanded)) {
 
  156                        $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);
 
  184        $tpl->setCurrentBlock(
"icon");
 
  187        $tpl->parseCurrentBlock();
 
  189        $tpl->setCurrentBlock(
"link");
 
  195        if ($style_class != 
"") {
 
  196            $tpl->setVariable(
"A_CLASS", 
' class="' . $style_class . 
'" ');
 
  199        $tpl->parseCurrentBlock();
 
  210        if ($a_node_id == 
"") {
 
  215        if (!is_array(
$_SESSION[$this->expand_variable])) {
 
  219        if ($a_node_id > 0 && !in_array($a_node_id, 
$_SESSION[$this->expand_variable])) {
 
  220            array_push(
$_SESSION[$this->expand_variable], $a_node_id);
 
  223        if ($a_node_id < 0) {
 
  224            $key = array_keys(
$_SESSION[$this->expand_variable], -(
int) $a_node_id);
 
  239                $ilCtrl->setParameterByClass(
"ilobjworkspacerootfoldergui", 
"wsp_id", $a_node_id);
 
  240                return $ilCtrl->getLinkTargetByClass(
"ilobjworkspacerootfoldergui", 
"");
 
  243                $ilCtrl->setParameterByClass(
"ilobjworkspacefoldergui", 
"wsp_id", $a_node_id);
 
  244                return $ilCtrl->getLinkTargetByClass(
"ilobjworkspacefoldergui", 
"");
 
  266        $this->allowed_types = $a_types;
 
  275        $this->show_details = $s_details;
 
  284        if ($this->show_details == 
'y' && !empty($a_desc)) {
 
  300        return sizeof($this->tree->getChildsByType($a_node_id, 
"wfld"));
 
  305        return $this->tree->getParentId($a_node_id);
 
  312        $html = parent::getOutput();
 
  313        $tpl->setBodyClass(
"std");
 
An exception for terminatinating execution or to throw for unit testing.
Class ilExplorer class for explorer view in admin frame.
getNodeStyleClass($a_id, $a_type)
get style class for node
getIndex($a_data)
get index of format_options array from specific ref_id,parent_id @access private
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
getOutput()
Creates output recursive method @access public.
buildFrameTarget($a_type, $a_child=0, $a_obj_id=0)
overwritten method from base class buid link target
setAllowedTypes($a_types)
set the alowed object types @access private
setExpand($a_node_id)
set the expand option this value is stored in a SESSION variable to save it different view (lo view,...
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 @access publ...
buildLinkTarget($a_node_id, $a_type)
overwritten method from base class get link target
getEnableSmallMode()
Get Enable Small Mode.
formatHeader($tpl, $a_obj_id, $a_option)
overwritten method from base class @access public
__construct($a_target, $a_user_id)
Constructor @access public.
getImageAlt($a_def, $a_type="", $a_obj_id="")
get image alt text
setShowDetails($s_details)
set details mode @access public
buildDescription($a_desc, $a_id, $a_type)
overwritten method from base class buid decription
getParentNode($a_node_id)
setEnableSmallMode($a_enablesmallmode)
Set Enable Small Mode.
Tree handler for personal workspace.