4include_once 
'./Services/UIComponent/Explorer/classes/class.ilExplorer.php';
 
   26        public function __construct($a_target,$a_server_id, $a_mid, $a_tree_id)
 
   30                parent::__construct($a_target);
 
   37                $this->filter = array();
 
   40                $this->server_id = $a_server_id;
 
   42                $this->tree_id = $a_tree_id;
 
   71                $this->form_items[
$type] = 
true;
 
   76                $this->form_items[
$type] = 
false;
 
   81                $this->checked_items = $a_checked_items;
 
   86                return in_array($a_id, $this->checked_items) ? true : 
false;
 
   91                $this->post_var = $a_post_var;
 
  100                if(!array_key_exists(
$a_type, $this->form_items) || !$this->form_items[
$a_type])
 
  105                include_once 
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
 
  133                if (!isset($a_node_id) or !is_array($a_option))
 
  135                        $this->
ilias->raiseError(get_class($this).
"::formatObject(): Missing parameter or wrong datatype! ".
 
  136                                                                        "node_id: ".$a_node_id.
" options:".var_dump($a_option),$this->
ilias->error_obj->WARNING);
 
  140                foreach ($a_option[
"tab"] as $picture)
 
  142                        if ($picture == 
'plus')
 
  144                                $tpl->setCurrentBlock(
"expander");
 
  145                                $tpl->setVariable(
"EXP_DESC", 
$lng->txt(
"expand"));
 
  147                                $tpl->setVariable(
"LINK_NAME", $a_node_id);
 
  148                                $tpl->setVariable(
"LINK_TARGET_EXPANDER", 
$target);
 
  149                                $tpl->setVariable(
"IMGPATH", $this->
getImage(
"browser/plus.png"));
 
  150                                $tpl->parseCurrentBlock();
 
  154                        if ($picture == 
'minus' && $this->show_minus)
 
  156                                $tpl->setCurrentBlock(
"expander");
 
  157                                $tpl->setVariable(
"EXP_DESC", 
$lng->txt(
"collapse"));
 
  159                                $tpl->setVariable(
"LINK_NAME", $a_node_id);
 
  160                                $tpl->setVariable(
"LINK_TARGET_EXPANDER", 
$target);
 
  161                                $tpl->setVariable(
"IMGPATH", $this->
getImage(
"browser/minus.png"));
 
  162                                $tpl->parseCurrentBlock();
 
  169                        $tpl->setCurrentBlock(
"blank");
 
  170                        $tpl->setVariable(
"BLANK_PATH", $this->
getImage(
"browser/blank.png"));
 
  171                        $tpl->parseCurrentBlock();
 
  174                if ($this->output_icons)
 
  176                        $tpl->setCurrentBlock(
"icon");
 
  177                        $tpl->setVariable(
"ICON_IMAGE" , $this->
getImage(
"icon_cat.svg", $a_option[
"type"], $a_obj_id));
 
  179                        $tpl->setVariable(
"TARGET_ID" , 
"iconid_".$a_node_id);
 
  180                        $this->iconList[] = 
"iconid_".$a_node_id;
 
  181                        $tpl->setVariable(
"TXT_ALT_IMG", 
$lng->txt($a_option[
"desc"]));
 
  182                        $tpl->parseCurrentBlock();
 
  185                if(strlen($formItem = $this->
buildFormItem($a_node_id, $a_option[
'type'])))
 
  187                        $tpl->setCurrentBlock(
'check');
 
  188                        $tpl->setVariable(
'OBJ_CHECK', $formItem);
 
  189                        $tpl->parseCurrentBlock();
 
  192                if ($this->
isClickable($a_option[
"type"], $a_node_id,$a_obj_id))        
 
  194                        $tpl->setCurrentBlock(
"link");
 
  202                        if ($style_class != 
"")
 
  204                                $tpl->setVariable(
"A_CLASS", 
' class="'.$style_class.
'" ' );
 
  207                        if (($onclick = $this->
buildOnClick($a_node_id, $a_option[
"type"], $a_option[
"title"])) != 
"")
 
  209                                $tpl->setVariable(
"ONCLICK", 
"onClick=\"$onclick\"");
 
  212                        $tpl->setVariable(
"LINK_NAME", $a_node_id);
 
  214                                $this->
buildTitle($a_option[
"title"], $a_node_id, $a_option[
"type"]),
 
  215                                $this->textwidth, 
true));
 
  217                                $this->
buildDescription($a_option[
"description"], $a_node_id, $a_option[
"type"]), $this->textwidth, 
true));
 
  218                        $frame_target = $this->
buildFrameTarget($a_option[
"type"], $a_node_id, $a_option[
"obj_id"]);
 
  219                        if ($frame_target != 
"")
 
  221                                $tpl->setVariable(
"TARGET", 
" target=\"".$frame_target.
"\"");
 
  223                        $tpl->parseCurrentBlock();
 
  227                        $tpl->setCurrentBlock(
"text");
 
  229                                $this->
buildTitle($a_option[
"title"], $a_node_id, $a_option[
"type"]), $this->textwidth, 
true));
 
  231                                $this->
buildDescription($a_option[
"desc"], $a_node_id, $a_option[
"type"]), $this->textwidth, 
true));
 
  232                        $tpl->parseCurrentBlock();
 
  235                $tpl->setCurrentBlock(
"list_item");
 
  236                $tpl->parseCurrentBlock();
 
  237                $tpl->touchBlock(
"element");
 
  257                $tpl->setCurrentBlock(
"icon");
 
  258                $nd = $this->tree->getNodeData($this->
getRoot());
 
  264                $tpl->parseCurrentBlock();
 
  266                if(strlen($formItem = $this->
buildFormItem($a_obj_id, $a_option[
'type'])))
 
  268                        $tpl->setCurrentBlock(
'check');
 
  269                        $tpl->setVariable(
'OBJ_CHECK', $formItem);
 
  270                        $tpl->parseCurrentBlock();
 
  280                        #$title = substr($title, 0,22).'...'; 
  283                include_once 
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
 
  296                                return '<font style="font-weight: bold">'.$title.
'</font>';
 
  299                                return '<font style="font-weight: bold;font-style: italic">'.$title.
'</font>';
 
  302                                return '<font style="font-style: italic">'.$title.
'</font>';
 
  308                                return '<font class="warning">'.$title.
'</font>';
 
An exception for terminatinating execution or to throw for unit testing.
const MAPPING_PENDING_DISCONNECTABLE
const MAPPING_PENDING_NOT_DISCONNECTABLE
static lookupStatusByObjId($a_server_id, $a_mid, $a_tree_id, $obj_id)
Lookup status.
buildFormItem($a_node_id, $a_type)
isClickable($a_type, $a_ref_id=0, $a_obj_id=0)
no item is clickable
formatObject($tpl, $a_node_id, $a_option, $a_obj_id=0)
Creates output recursive method @access private.
addFormItemForType($type)
Add form item.
buildTitle($title, $a_obj_id, $a_type)
standard implementation for title, may be overwritten by derived classes
formatHeader($tpl, $a_obj_id, $a_option)
Creates output for header (is empty here but can be overwritten in derived classes)
setTree(ilECSCmsTree $tree)
Set cms tree.
__construct($a_target, $a_server_id, $a_mid, $a_tree_id)
setCheckedItems($a_checked_items=array())
removeFormItemForType($type)
Class ilExplorer class for explorer view in admin frame.
getNodeStyleClass($a_id, $a_type)
get style class for node
buildOnClick($a_node_id, $a_type, $a_title)
get onclick event handling (may be overwritten by derived classes)
setTitleLength($a_length)
Set max title length.
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)
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.
redirection script todo: (a better solution should control the processing via a xml file)