4require_once 
'Services/Repository/classes/class.ilRepositoryExplorer.php';
 
   44                $this->access = $a_access_handler;
 
   46                parent::__construct($a_target);
 
   53                        $root = 
new $root(
null);
 
   60                $this->tree = $a_tree;
 
   62                $this->order_column = 
'title';
 
   66                $this->filter = array();
 
   81                        $this->access->checkAccess(
'read', 
'', $a_ref_id))
 
   93        public function sortNodes($a_nodes,$a_parent_obj_id)
 
  100                if(is_array($this->clickable) && in_array(
$a_type, $this->clickable) &&
 
  110                $this->form_items[
$type] = 
true;
 
  114                $this->form_items[
$type] = 
false;
 
  118                $this->form_items = array();
 
  122                $this->checked_items = $a_checked_items;
 
  126                return in_array($a_id, $this->checked_items) ? true : 
false;
 
  130                $this->post_var = $a_post_var;
 
  139                if(!array_key_exists(
$a_type, $this->form_items) || !$this->form_items[
$a_type])
 
  158                if (!isset($a_node_id) or !is_array($a_option))
 
  160                        require_once 
'./Services/Exceptions/classes/class.ilException.php';
 
  161                        throw new ilException(
"Missing parameter or wrong datatype! ".
 
  162                                "node_id: ".$a_node_id.
" options:".var_dump($a_option));
 
  166                foreach ($a_option[
"tab"] as $picture)
 
  168                        if ($picture == 
'plus')
 
  170                                $tpl->setCurrentBlock(
"expander");
 
  171                                $tpl->setVariable(
"EXP_DESC", 
$lng->txt(
"expand"));
 
  173                                $tpl->setVariable(
"LINK_NAME", $a_node_id);
 
  174                                $tpl->setVariable(
"LINK_TARGET_EXPANDER", 
$target);
 
  175                                $tpl->setVariable(
"IMGPATH", $this->
getImage(
"browser/plus.png"));
 
  176                                $tpl->parseCurrentBlock();
 
  180                        if ($picture == 
'minus' && $this->show_minus)
 
  182                                $tpl->setCurrentBlock(
"expander");
 
  183                                $tpl->setVariable(
"EXP_DESC", 
$lng->txt(
"collapse"));
 
  185                                $tpl->setVariable(
"LINK_NAME", $a_node_id);
 
  186                                $tpl->setVariable(
"LINK_TARGET_EXPANDER", 
$target);
 
  187                                $tpl->setVariable(
"IMGPATH", $this->
getImage(
"browser/minus.png"));
 
  188                                $tpl->parseCurrentBlock();
 
  195                        $tpl->setCurrentBlock(
"blank");
 
  196                        $tpl->setVariable(
"BLANK_PATH", $this->
getImage(
"browser/blank.png"));
 
  197                        $tpl->parseCurrentBlock();
 
  200                if ($this->output_icons)
 
  202                        $tpl->setCurrentBlock(
"icon");
 
  203                        $tpl->setVariable(
"ICON_IMAGE" , $this->
getImage(
"icon_".$a_option[
"type"].
".svg", $a_option[
"type"], $a_obj_id));
 
  205                        $tpl->setVariable(
"TARGET_ID" , 
"iconid_".$a_node_id);
 
  206                        $this->iconList[] = 
"iconid_".$a_node_id;
 
  207                        $tpl->setVariable(
"TXT_ALT_IMG", 
$lng->txt($a_option[
"desc"]));
 
  208                        $tpl->parseCurrentBlock();
 
  211                if(strlen($formItem = $this->
buildFormItem($a_node_id, $a_option[
'type'])))
 
  213                        $tpl->setCurrentBlock(
'check');
 
  214                        $tpl->setVariable(
'OBJ_CHECK', $formItem);
 
  215                        $tpl->parseCurrentBlock();
 
  218                if ($this->
isClickable($a_option[
"type"], $a_node_id,$a_obj_id))        
 
  220                        $tpl->setCurrentBlock(
"link");
 
  228                        if ($style_class != 
"")
 
  230                                $tpl->setVariable(
"A_CLASS", 
' class="'.$style_class.
'" ' );
 
  233                        if (($onclick = $this->
buildOnClick($a_node_id, $a_option[
"type"], $a_option[
"title"])) != 
"")
 
  235                                $tpl->setVariable(
"ONCLICK", 
"onClick=\"$onclick\"");
 
  238                        $tpl->setVariable(
"LINK_NAME", $a_node_id);
 
  240                                $this->
buildTitle($a_option[
"title"], $a_node_id, $a_option[
"type"]),
 
  241                                $this->textwidth, 
true));
 
  243                                $this->
buildDescription($a_option[
"description"], $a_node_id, $a_option[
"type"]), $this->textwidth, 
true));
 
  244                        $frame_target = $this->
buildFrameTarget($a_option[
"type"], $a_node_id, $a_option[
"obj_id"]);
 
  245                        if ($frame_target != 
"")
 
  247                                $tpl->setVariable(
"TARGET", 
" target=\"".$frame_target.
"\"");
 
  249                        $tpl->parseCurrentBlock();
 
  253                        $tpl->setCurrentBlock(
"text");
 
  255                                $this->
buildTitle($a_option[
"title"], $a_node_id, $a_option[
"type"]), $this->textwidth, 
true));
 
  257                                $this->
buildDescription($a_option[
"desc"], $a_node_id, $a_option[
"type"]), $this->textwidth, 
true));                    
 
  258                        $tpl->parseCurrentBlock();
 
  261                $tpl->setCurrentBlock(
"list_item");
 
  262                $tpl->parseCurrentBlock();
 
  263                $tpl->touchBlock(
"element");
 
  280                $tpl->setCurrentBlock(
"icon");
 
  281                $title = $this->tree->getNodeData($this->root_id);
 
  290                $tpl->parseCurrentBlock();              
 
  292                if(strlen($formItem = $this->
buildFormItem($a_obj_id, $a_option[
'type'])))
 
  294                        $tpl->setCurrentBlock(
'check');
 
  295                        $tpl->setVariable(
'OBJ_CHECK', $formItem);
 
  296                        $tpl->parseCurrentBlock();
 
  309                $this->custom_link_target = $a_target;          
 
  314                if(!$this->custom_link_target)
 
  316                        return parent::buildLinkTarget($a_node_id, 
$a_type);
 
  319                $link = $this->custom_link_target.
"&".$this->target_get.
"=".$a_node_id;
 
An exception for terminatinating execution or to throw for unit testing.
Base class for ILIAS Exception handling.
getNodeStyleClass($a_id, $a_type)
get style class for node
setSessionExpandVariable($a_var_name="expand")
set name of expand session variable
addFilter($a_item)
adds item to the filter @access public
buildOnClick($a_node_id, $a_type, $a_title)
get onclick event handling (may be overwritten by derived classes)
setFilterMode($a_mode=IL_FM_NEGATIVE)
set filter mode
setFiltered($a_bool)
active/deactivate the filter @access public
createTarget($a_type, $a_node_id, $a_highlighted_subtree=false, $a_append_anch=true)
Creates Get Parameter @access private.
buildTitle($a_title, $a_id, $a_type)
standard implementation for title, may be overwritten by derived classes
buildDescription($a_desc, $a_id, $a_type)
standard implementation for description, may be overwritten by derived classes
static getClassByType($a_obj_type)
Get class by type.
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
getImage($a_name, $a_type="", $a_obj_id="")
get image path
buildFrameTarget($a_type, $a_child=0, $a_obj_id=0)
STATIC, do not use $this inside!
getTreeId()
get tree id @access public
readRootId()
read root id from database
addTree($a_tree_id, $a_node_id=-1)
create a new tree to do: ???
static formRadioButton($checked, $varname, $value, $onclick=null, $disabled=false)
??? @access public
static formCheckbox($checked, $varname, $value, $disabled=false)
??? @access public
static shortenText($a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
Access handler for personal workspace.
sortNodes($a_nodes, $a_parent_obj_id)
sort nodes
isClickable($a_type, $a_ref_id=0, $a_obj_id=0)
removeFormItemForType($type)
addFormItemForType($type)
buildFormItem($a_node_id, $a_type)
formatHeader($tpl, $a_obj_id, $a_option)
overwritten method from base class @access public
__construct($a_type, $a_target, $a_session_variable, ilWorkspaceTree $a_tree, ilWorkspaceAccessHandler $a_access_handler)
Constructor @access public.
setCustomLinkTarget($a_target)
showChilds($a_ref_id, $a_obj_id=0)
setTypeClickable($a_type)
isVisible($a_ref_id, $a_type)
setCheckedItems($a_checked_items=array())
buildLinkTarget($a_node_id, $a_type)
note: most of this stuff is used by ilCourseContentInterface too
formatObject($tpl, $a_node_id, $a_option, $a_obj_id=0)
Creates output recursive method @access private.
Tree handler for personal workspace.
createReference($a_object_id)
Create workspace reference for object.