4include_once 
'./Services/UIComponent/Explorer/classes/class.ilExplorer.php';
 
   31                parent::__construct($a_target);
 
   39                $this->
setRoot($tree->readRootId());
 
   44                $this->filter = array();
 
   87                $this->form_items[
$type] = 
true;
 
   92                $this->form_items[
$type] = 
false;
 
   97                $this->checked_items = $a_checked_items;
 
  107                return in_array($a_id, $this->checked_items) ? true : 
false;
 
  112                $this->post_var = $a_post_var;
 
  121                if(!array_key_exists(
$a_type, $this->form_items) || !$this->form_items[
$a_type]) 
return '';
 
  139                if (!isset($a_node_id) or !is_array($a_option))
 
  141                        $this->
ilias->raiseError(get_class($this).
"::formatObject(): Missing parameter or wrong datatype! ".
 
  142                                                                        "node_id: ".$a_node_id.
" options:".var_dump($a_option),$this->
ilias->error_obj->WARNING);
 
  146                foreach ($a_option[
"tab"] as $picture)
 
  148                        if ($picture == 
'plus')
 
  150                                $tpl->setCurrentBlock(
"expander");
 
  151                                $tpl->setVariable(
"EXP_DESC", 
$lng->txt(
"expand"));
 
  153                                $tpl->setVariable(
"LINK_NAME", $a_node_id);
 
  154                                $tpl->setVariable(
"LINK_TARGET_EXPANDER", 
$target);
 
  155                                $tpl->setVariable(
"IMGPATH", $this->
getImage(
"browser/plus.png"));
 
  156                                $tpl->parseCurrentBlock();
 
  160                        if ($picture == 
'minus' && $this->show_minus)
 
  162                                $tpl->setCurrentBlock(
"expander");
 
  163                                $tpl->setVariable(
"EXP_DESC", 
$lng->txt(
"collapse"));
 
  165                                $tpl->setVariable(
"LINK_NAME", $a_node_id);
 
  166                                $tpl->setVariable(
"LINK_TARGET_EXPANDER", 
$target);
 
  167                                $tpl->setVariable(
"IMGPATH", $this->
getImage(
"browser/minus.png"));
 
  168                                $tpl->parseCurrentBlock();
 
  175                        $tpl->setCurrentBlock(
"blank");
 
  176                        $tpl->setVariable(
"BLANK_PATH", $this->
getImage(
"browser/blank.png"));
 
  177                        $tpl->parseCurrentBlock();
 
  180                if ($this->output_icons)
 
  182                        $tpl->setCurrentBlock(
"icon");
 
  183                        $tpl->setVariable(
"ICON_IMAGE" , $this->
getImage(
"icon_".$a_option[
"type"].
".svg", $a_option[
"type"], $a_obj_id));
 
  185                        $tpl->setVariable(
"TARGET_ID" , 
"iconid_".$a_node_id);
 
  186                        $this->iconList[] = 
"iconid_".$a_node_id;
 
  187                        $tpl->setVariable(
"TXT_ALT_IMG", 
$lng->txt($a_option[
"desc"]));
 
  188                        $tpl->parseCurrentBlock();
 
  191                if(strlen($formItem = $this->
buildFormItem($a_node_id, $a_option[
'type'])))
 
  193                        $tpl->setCurrentBlock(
'check');
 
  194                        $tpl->setVariable(
'OBJ_CHECK', $formItem);
 
  195                        $tpl->parseCurrentBlock();
 
  198                if ($this->
isClickable($a_option[
"type"], $a_node_id,$a_obj_id))        
 
  200                        $tpl->setCurrentBlock(
"link");
 
  208                        if ($style_class != 
"")
 
  210                                $tpl->setVariable(
"A_CLASS", 
' class="'.$style_class.
'" ' );
 
  213                        if (($onclick = $this->
buildOnClick($a_node_id, $a_option[
"type"], $a_option[
"title"])) != 
"")
 
  215                                $tpl->setVariable(
"ONCLICK", 
"onClick=\"$onclick\"");
 
  218                        $tpl->setVariable(
"LINK_NAME", $a_node_id);
 
  219                        $tpl->setVariable(
"TITLE", 
 
  220                                $this->
buildTitle($a_option[
"title"], $a_node_id, $a_option[
"type"])
 
  223                                $this->
buildDescription($a_option[
"description"], $a_node_id, $a_option[
"type"]), $this->textwidth, 
true));
 
  224                        $frame_target = $this->
buildFrameTarget($a_option[
"type"], $a_node_id, $a_option[
"obj_id"]);
 
  225                        if ($frame_target != 
"")
 
  227                                $tpl->setVariable(
"TARGET", 
" target=\"".$frame_target.
"\"");
 
  229                        $tpl->parseCurrentBlock();
 
  233                        $tpl->setCurrentBlock(
"text");
 
  234                        $tpl->setVariable(
"OBJ_TITLE",
 
  235                                $this->
buildTitle($a_option[
"title"], $a_node_id, $a_option[
"type"]));
 
  237                                $this->
buildDescription($a_option[
"desc"], $a_node_id, $a_option[
"type"]), $this->textwidth, 
true));
 
  238                        $tpl->parseCurrentBlock();
 
  241                $tpl->setCurrentBlock(
"list_item");
 
  242                $tpl->parseCurrentBlock();
 
  243                $tpl->touchBlock(
"element");
 
  263                $tpl->setCurrentBlock(
"icon");
 
  264                $nd = 
$tree->getNodeData(ROOT_FOLDER_ID);
 
  273                $tpl->parseCurrentBlock();
 
  275                if(strlen($formItem = $this->
buildFormItem($a_obj_id, $a_option[
'type'])))
 
  277                        $tpl->setCurrentBlock(
'check');
 
  278                        $tpl->setVariable(
'OBJ_CHECK', $formItem);
 
  279                        $tpl->parseCurrentBlock();
 
  286                                '<font style="font-weight: bold">'.
$title.
'</font>' 
  306                        return '<font style="font-weight: bold">'.$title.
'</font>';
 
  310                        return '<font style="font-style: italic">'.$title.
'</font>';
 
  320                include_once 
'./Services/WebServices/ECS/classes/Course/class.ilECSCourseMappingRule.php';
 
  336                return array_key_exists($a_ref_id, $this->mappings);
 
  341                foreach($this->mappings as 
$ref_id => $parent_nodes)
 
  343                        if(in_array($a_ref_id, $parent_nodes))
 
An exception for terminatinating execution or to throw for unit testing.
static getRuleRefIds($a_sid, $a_mid)
__construct($a_target, $a_sid, $a_mid)
buildTitle($title, $a_obj_id, $a_type)
Format title (bold for direct mappings, italic for child mappings)
formatObject($tpl, $a_node_id, $a_option, $a_obj_id=0)
Creates output recursive method @access private.
buildFormItem($a_node_id, $a_type)
setCheckedItems($a_checked_items=array())
isClickable($a_type, $a_ref_id=0, $a_obj_id=0)
no item is clickable
removeFormItemForType($type)
hasParentMapping($a_ref_id)
addFormItemForType($type)
Add form item.
formatHeader($tpl, $a_obj_id, $a_option)
Creates output for header (is empty here but can be overwritten in derived classes)
initMappings()
Init (read) current mappings.
Class ilExplorer class for explorer view in admin frame.
getNodeStyleClass($a_id, $a_type)
get style class for node
addFilter($a_item)
adds item to the filter @access public
setRoot($a_root_id)
Set root node.
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
getImage($a_name, $a_type="", $a_obj_id="")
get image path (may be overwritten by derived classes)
buildFrameTarget($a_type, $a_child=0, $a_obj_id=0)
get frame target (may be overwritten by derived classes)
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.
setOrderColumn($a_column)
set the order column @access public
buildDescription($a_desc, $a_id, $a_type)
standard implementation for description, may be overwritten by derived classes
buildLinkTarget($a_node_id, $a_type)
get link target (may be overwritten by derived classes)
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
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.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
redirection script todo: (a better solution should control the processing via a xml file)