ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilExplorer Class Reference

class for explorer view in admin frame More...

+ Inheritance diagram for ilExplorer:
+ Collaboration diagram for ilExplorer:

Public Member Functions

 setId (string $a_val)
 
 getId ()
 
 setAsynchExpanding (bool $a_val)
 
 getAsynchExpanding ()
 
 initItemCounter (int $a_number)
 
 setTitle (string $a_val)
 
 setTitleLength (int $a_length)
 
 getTitleLength ()
 
 getTitle ()
 
 setRoot ($a_root_id)
 
 getRoot ()
 
 setOrderColumn (string $a_column)
 
 setOrderDirection (string $a_direction)
 
 setTargetGet (string $a_target_get)
 
 setParamsGet (array $a_params_get)
 
 setExpandTarget (string $a_exp_target)
 target script for expand icons More...
 
 setFrameUpdater (string $a_up_frame, string $a_up_script, string $a_params="")
 
 highlightNode (string $a_id)
 
 checkPermissions (bool $a_check)
 
 setSessionExpandVariable (string $a_var_name="expand")
 
 outputIcons (bool $a_icons)
 
 setClickable (string $a_type, bool $a_clickable)
 
 isVisible ( $a_ref_id, string $a_type)
 
 setTreeLead (string $a_val)
 
 getTreeLead ()
 
 isClickable (string $type, int $ref_id=0)
 
 setPostSort (bool $a_sort)
 
 setFilterMode (int $a_mode=IL_FM_NEGATIVE)
 
 getFilterMode ()
 
 setUseStandardFrame (bool $a_val)
 Set use standard frame. More...
 
 getUseStandardFrame ()
 
 getChildsOfNode ($a_parent_id)
 
 setOutput ( $a_parent_id, int $a_depth=1, int $a_obj_id=0, bool $a_highlighted_subtree=false)
 Creates output for explorer view in admin menue recursive method. More...
 
 modifyChilds ( $a_parent_id, array $a_objects)
 
 showChilds ($a_parent_id)
 determines wether the childs of an object should be shown or not note: this standard implementation always returns true but it could be overwritten by derived classes (e.g. More...
 
 forceExpanded ($a_obj_id)
 force expansion of node More...
 
 getMaximumTreeDepth ()
 
 getOutput ()
 
 handleListEndTags (ilTemplate $a_tpl_tree, int $a_cur_depth, int $a_item_depth)
 handle list end tags ( and ) More...
 
 handleListStartTags (ilTemplate $a_tpl_tree, int $a_cur_depth, int $a_item_depth)
 handle list start tags ( More...
 
 formatHeader (ilTemplate $tpl, $a_obj_id, array $a_option)
 
 formatObject (ilTemplate $tpl, $a_node_id, array $a_option, $a_obj_id=0)
 
 getImage (string $a_name, string $a_type="", $a_obj_id="")
 
 getImageAlt (string $a_default_text, string $a_type="", $a_obj_id="")
 
 getNodeStyleClass ( $a_id, string $a_type)
 
 buildLinkTarget ( $a_node_id, string $a_type)
 
 buildOnClick ( $a_node_id, string $a_type, string $a_title)
 
 buildTitle (string $a_title, $a_id, string $a_type)
 
 buildDescription (string $a_desc, $a_id, string $a_type)
 
 buildSelect ($a_node_id, string $a_type)
 standard implementation for adding an option select box between image and title More...
 
 buildFrameTarget (string $a_type, $a_child=0, $a_obj_id=0)
 
 createTarget (string $a_type, $a_node_id, bool $a_highlighted_subtree=false, bool $a_append_anch=true)
 
 setFrameTarget (string $a_target)
 
 createLines (int $a_depth)
 
 is_in_array (int $a_start, int $a_depth)
 
 getIndex (array $a_data)
 
 addFilter (string $a_item)
 
 delFilter (string $a_item)
 
 setExpand ($a_node_id)
 set the expand option this value is stored in a SESSION variable to save it different view (lo view, frm view,...) More...
 
 forceExpandAll (bool $a_mode, bool $a_show_minus=true)
 force expandAll. More...
 
 setFiltered (bool $a_bool)
 
 checkFilter (string $a_item)
 
 sortNodes (array $a_nodes, $a_parent_obj_id)
 sort nodes and put adm object to the end of sorted array More...
 

Data Fields

string $id = ""
 
string $output = ""
 
array $format_options = []
 
ilTree $tree
 
string $target = ""
 
string $target_get = ""
 
string $params_get = ""
 
array $expanded = []
 
string $order_column = ""
 
string $order_direction = "asc"
 
string $expand_target = null
 
bool $rbac_check = false
 
bool $output_icons = false
 
string $expand_variable = ""
 
array $is_clickable = []
 
bool $post_sort = false
 
bool $filtered = false
 
bool $filter_mode
 
bool $expand_all = false
 
 $root_id = null
 
bool $use_standard_frame = false
 

Protected Member Functions

 requestStr (string $key)
 

Protected Attributes

ilObjectDefinition $obj_definition
 
ilErrorHandling $error
 
ilRbacSystem $rbacsystem
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
 $filter = []
 
string $highlighted = ""
 
bool $show_minus = true
 
int $counter = 0
 
bool $asnch_expanding = false
 
int $textwidth = 0
 
string $title = ""
 
string $up_frame = ""
 
string $a_up_script = ""
 
string $up_params = ""
 
string $frame_target = ""
 
string $up_script = ""
 
string $tree_lead = ""
 
array $iconList = []
 
ILIAS Refinery Factory $refinery
 
ILIAS HTTP Wrapper WrapperFactory $wrapper
 

Detailed Description

class for explorer view in admin frame

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Deprecated:
with ILIAS 12

Definition at line 29 of file class.ilExplorer.php.

Member Function Documentation

◆ addFilter()

ilExplorer::addFilter ( string  $a_item)

Definition at line 1000 of file class.ilExplorer.php.

1000 : bool
1001 {
1002 if (is_array($this->filter)) {
1003 //run through filter
1004 foreach ($this->filter as $item) {
1005 if ($item === $a_item) {
1006 return false;
1007 }
1008 }
1009 } else {
1010 $this->filter = array();
1011 }
1012 $this->filter[] = $a_item;
1013
1014 return true;
1015 }
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)

References ILIAS\Repository\filter().

Referenced by ilSearchRootSelector\__construct(), ilSolutionExplorer\__construct(), ilPasteIntoMultipleItemsExplorer\__construct(), ilContainerSelectionExplorer\__construct(), and ilECSNodeMappingLocalExplorer\__construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildDescription()

ilExplorer::buildDescription ( string  $a_desc,
  $a_id,
string  $a_type 
)

Definition at line 877 of file class.ilExplorer.php.

881 : string {
882 return "";
883 }

Referenced by ilECSNodeMappingCmsExplorer\formatObject(), and ilECSNodeMappingLocalExplorer\formatObject().

+ Here is the caller graph for this function:

◆ buildFrameTarget()

ilExplorer::buildFrameTarget ( string  $a_type,
  $a_child = 0,
  $a_obj_id = 0 
)

Reimplemented in ilSearchRootSelector, and ilSolutionExplorer.

Definition at line 893 of file class.ilExplorer.php.

897 : string {
898 return $this->frame_target;
899 }
string $frame_target

Referenced by ilECSNodeMappingCmsExplorer\formatObject(), ilECSNodeMappingLocalExplorer\formatObject(), and ilSCORMExplorer\insertObject().

+ Here is the caller graph for this function:

◆ buildLinkTarget()

ilExplorer::buildLinkTarget (   $a_node_id,
string  $a_type 
)

Reimplemented in ilRepositoryExplorer, ilSearchRootSelector, and ilSolutionExplorer.

Definition at line 851 of file class.ilExplorer.php.

854 : string {
855 $target = (strpos($this->target, "?") === false)
856 ? $this->target . "?"
857 : $this->target . "&";
858 return $target . $this->target_get . "=" . $a_node_id . $this->params_get;
859 }
string $params_get

Referenced by ilECSNodeMappingCmsExplorer\formatObject(), and ilECSNodeMappingLocalExplorer\formatObject().

+ Here is the caller graph for this function:

◆ buildOnClick()

ilExplorer::buildOnClick (   $a_node_id,
string  $a_type,
string  $a_title 
)

Definition at line 861 of file class.ilExplorer.php.

865 : string {
866 return "";
867 }

Referenced by ilECSNodeMappingCmsExplorer\formatObject(), and ilECSNodeMappingLocalExplorer\formatObject().

+ Here is the caller graph for this function:

◆ buildSelect()

ilExplorer::buildSelect (   $a_node_id,
string  $a_type 
)

standard implementation for adding an option select box between image and title

Definition at line 888 of file class.ilExplorer.php.

888 : string
889 {
890 return "";
891 }

◆ buildTitle()

ilExplorer::buildTitle ( string  $a_title,
  $a_id,
string  $a_type 
)

Reimplemented in ilECSNodeMappingCmsExplorer, and ilECSNodeMappingLocalExplorer.

Definition at line 869 of file class.ilExplorer.php.

873 : string {
874 return $a_title;
875 }

◆ checkFilter()

ilExplorer::checkFilter ( string  $a_item)

Definition at line 1085 of file class.ilExplorer.php.

1085 : bool
1086 {
1087 if (is_array($this->filter)) {
1088 if (in_array($a_item, $this->filter)) {
1089 $ret = true;
1090 } else {
1091 $ret = false;
1092 }
1093 } else {
1094 $ret = false;
1095 }
1096
1097 if ($this->getFilterMode() === IL_FM_NEGATIVE) {
1098 return $ret;
1099 } else {
1100 return !$ret;
1101 }
1102 }
const IL_FM_NEGATIVE

References ILIAS\Repository\filter(), and IL_FM_NEGATIVE.

+ Here is the call graph for this function:

◆ checkPermissions()

ilExplorer::checkPermissions ( bool  $a_check)

Definition at line 266 of file class.ilExplorer.php.

266 : void
267 {
268 $this->rbac_check = $a_check;
269 }

Referenced by ilContainerSelectionExplorer\__construct(), and ilSCORMExplorer\__construct().

+ Here is the caller graph for this function:

◆ createLines()

ilExplorer::createLines ( int  $a_depth)

Definition at line 943 of file class.ilExplorer.php.

943 : void
944 {
945 for ($i = 0, $iMax = count($this->format_options); $i < $iMax; ++$i) {
946 if ($this->format_options[$i]["depth"] == $a_depth + 1
947 and !$this->format_options[$i]["container"]
948 and $this->format_options[$i]["depth"] != 1) {
949 $this->format_options[$i]["tab"][(string) $a_depth] = "quer";
950 }
951
952 if ($this->format_options[$i]["depth"] == $a_depth + 2) {
953 if ($this->is_in_array($i + 1, $this->format_options[$i]["depth"])) {
954 $this->format_options[$i]["tab"][(string) $a_depth] = "winkel";
955 } else {
956 $this->format_options[$i]["tab"][(string) $a_depth] = "ecke";
957 }
958 }
959
960 if ($this->format_options[$i]["depth"] > $a_depth + 2) {
961 if ($this->is_in_array($i + 1, $a_depth + 2)) {
962 $this->format_options[$i]["tab"][(string) $a_depth] = "hoch";
963 }
964 }
965 }
966 }
is_in_array(int $a_start, int $a_depth)

◆ createTarget()

ilExplorer::createTarget ( string  $a_type,
  $a_node_id,
bool  $a_highlighted_subtree = false,
bool  $a_append_anch = true 
)

Reimplemented in ilSCORMExplorer.

Definition at line 902 of file class.ilExplorer.php.

907 : string {
909
910 if (!isset($a_type) or !is_string($a_type) or !isset($a_node_id)) {
911 $ilErr->raiseError(get_class($this) . "::createTarget(): Missing parameter or wrong datatype! " .
912 "type: " . $a_type . " node_id:" . $a_node_id, $ilErr->WARNING);
913 }
914
915 // SET expand parameter:
916 // positive if object is expanded
917 // negative if object is compressed
918 $a_node_id = $a_type === '+' ? $a_node_id : -(int) $a_node_id;
919
920 $sep = (is_int(strpos($this->expand_target, "?")))
921 ? "&"
922 : "?";
923
924 // in current tree flag
925 $ict_str = ($a_highlighted_subtree || $this->highlighted === "")
926 ? "&ict=1"
927 : "";
928 if ($this->getAsynchExpanding()) {
929 $ict_str .= "&cmdMode=asynch";
930 }
931 if ($a_append_anch) {
932 return $this->expand_target . $sep . $this->expand_variable . "=" . $a_node_id . $this->params_get . $ict_str . "#" . abs($a_node_id);
933 } else {
934 return $this->expand_target . $sep . $this->expand_variable . "=" . $a_node_id . $this->params_get . $ict_str;
935 }
936 }
ilErrorHandling $error
$ilErr
Definition: raiseError.php:33

References $ilErr.

Referenced by ilECSNodeMappingCmsExplorer\formatObject(), and ilECSNodeMappingLocalExplorer\formatObject().

+ Here is the caller graph for this function:

◆ delFilter()

ilExplorer::delFilter ( string  $a_item)

Definition at line 1017 of file class.ilExplorer.php.

1017 : bool
1018 {
1019 $deleted = 0;
1020 //check if a filter exists
1021 if (is_array($this->filter)) {
1022 //build copy of the existing filter without the given item
1023 $tmp = array();
1024
1025 foreach ($this->filter as $item) {
1026 if ($item !== $a_item) {
1027 $tmp[] = $item;
1028 } else {
1029 $deleted = 1;
1030 }
1031 }
1032
1033 $this->filter = $tmp;
1034 } else {
1035 return false;
1036 }
1037
1038 return $deleted === 1;
1039 }

References ILIAS\Repository\filter().

+ Here is the call graph for this function:

◆ forceExpandAll()

ilExplorer::forceExpandAll ( bool  $a_mode,
bool  $a_show_minus = true 
)

force expandAll.

if true all nodes are expanded regardless of the values in $expanded (default: false)

Definition at line 1071 of file class.ilExplorer.php.

1074 : void {
1075 $this->expand_all = $a_mode;
1076 $this->show_minus = $a_show_minus;
1077 }

◆ forceExpanded()

ilExplorer::forceExpanded (   $a_obj_id)

force expansion of node

Reimplemented in ilRepositoryExplorer.

Definition at line 509 of file class.ilExplorer.php.

509 : bool
510 {
511 return false;
512 }

◆ formatHeader()

ilExplorer::formatHeader ( ilTemplate  $tpl,
  $a_obj_id,
array  $a_option 
)

◆ formatObject()

ilExplorer::formatObject ( ilTemplate  $tpl,
  $a_node_id,
array  $a_option,
  $a_obj_id = 0 
)

Reimplemented in ilECSNodeMappingLocalExplorer, and ilPasteIntoMultipleItemsExplorer.

Definition at line 674 of file class.ilExplorer.php.

679 : void {
682
683 if (!isset($a_node_id) or !is_array($a_option)) {
684 $ilErr->raiseError(get_class($this) . "::formatObject(): Missing parameter or wrong datatype! " .
685 "node_id: " . $a_node_id . " options:" . var_export($a_option, true), $ilErr->WARNING);
686 }
687
688 $pic = false;
689 foreach ((array) $a_option["tab"] as $picture) {
690 if ($picture === 'plus') {
691 $tpl->setCurrentBlock("expander");
692 $tpl->setVariable("EXP_DESC", $lng->txt("collapsed"));
693 $tpl->setVariable("LINK_NAME", $a_node_id);
694 if (!$this->getAsynchExpanding()) {
695 $target = $this->createTarget('+', $a_node_id, $a_option["highlighted_subtree"]);
696 $tpl->setVariable("LINK_TARGET_EXPANDER", $target);
697 } else {
698 $target = $this->createTarget('+', $a_node_id, $a_option["highlighted_subtree"], false);
699 $tpl->setVariable("ONCLICK_TARGET_EXPANDER", " onclick=\"return il.Explorer.refresh('tree_div', '" . $target . "');\"");
700 $tpl->setVariable("LINK_TARGET_EXPANDER", "#");
701 }
702 $tpl->setVariable("IMGPATH", $this->getImage("browser/plus.png"));
703 $tpl->parseCurrentBlock();
704 $pic = true;
705 }
706
707 if ($picture === 'forceexp') {
708 $tpl->setCurrentBlock("expander");
709 $tpl->setVariable("EXP_DESC", $lng->txt("expanded"));
710 $target = $this->createTarget('+', $a_node_id);
711 $tpl->setVariable("LINK_NAME", $a_node_id);
712 $tpl->setVariable("LINK_TARGET_EXPANDER", $target);
713 $tpl->setVariable("IMGPATH", $this->getImage("browser/forceexp.png"));
714 $tpl->parseCurrentBlock();
715 $pic = true;
716 }
717
718 if ($picture === 'minus' && $this->show_minus) {
719 $tpl->setCurrentBlock("expander");
720 $tpl->setVariable("EXP_DESC", $lng->txt("expanded"));
721 $tpl->setVariable("LINK_NAME", $a_node_id);
722 if (!$this->getAsynchExpanding()) {
723 $target = $this->createTarget('-', $a_node_id, $a_option["highlighted_subtree"]);
724 $tpl->setVariable("LINK_TARGET_EXPANDER", $target);
725 } else {
726 $target = $this->createTarget('-', $a_node_id, $a_option["highlighted_subtree"], false);
727 $tpl->setVariable("ONCLICK_TARGET_EXPANDER", " onclick=\"return il.Explorer.refresh('tree_div', '" . $target . "');\"");
728 $tpl->setVariable("LINK_TARGET_EXPANDER", "#");
729 }
730 $tpl->setVariable("IMGPATH", $this->getImage("browser/minus.png"));
731 $tpl->parseCurrentBlock();
732 $pic = true;
733 }
734 }
735
736 if (!$pic) {
737 $tpl->setCurrentBlock("blank");
738 $tpl->setVariable("BLANK_PATH", $this->getImage("browser/blank.png"));
739 $tpl->parseCurrentBlock();
740 }
741
742 if ($this->output_icons) {
743 $tpl->setCurrentBlock("icon");
744 $tpl->setVariable("ICON_IMAGE", $this->getImage("standard/icon_" . $a_option["type"] . ".svg", $a_option["type"], $a_obj_id));
745
746 $tpl->setVariable("TARGET_ID", "iconid_" . $a_node_id);
747 $this->iconList[] = "iconid_" . $a_node_id;
749 "TXT_ALT_IMG",
750 $this->getImageAlt($lng->txt("icon") . " " . $lng->txt($a_option["desc"]), $a_option["type"], $a_obj_id)
751 );
753 }
754
755 if (($sel = $this->buildSelect($a_node_id, $a_option['type'])) !== '') {
756 $tpl->setCurrentBlock('select');
757 $tpl->setVariable('OBJ_SEL', $sel);
759 }
760
761 if ($this->isClickable($a_option["type"], $a_node_id)) { // output link
762 $tpl->setCurrentBlock("link");
763 //$target = (strpos($this->target, "?") === false) ?
764 // $this->target."?" : $this->target."&";
765 //$tpl->setVariable("LINK_TARGET", $target.$this->target_get."=".$a_node_id.$this->params_get);
766 $tpl->setVariable("LINK_TARGET", $this->buildLinkTarget($a_node_id, $a_option["type"]));
767
768 $style_class = $this->getNodeStyleClass($a_node_id, $a_option["type"]);
769
770 if ($style_class !== "") {
771 $tpl->setVariable("A_CLASS", ' class="' . $style_class . '" ');
772 }
773
774 if (($onclick = $this->buildOnClick($a_node_id, $a_option["type"], $a_option["title"])) != "") {
775 $tpl->setVariable("ONCLICK", "onClick=\"$onclick\"");
776 }
777
778 //$tpl->setVariable("LINK_NAME", $a_node_id);
780 "TITLE",
782 $this->buildTitle($a_option["title"], $a_node_id, $a_option["type"]),
783 $this->textwidth,
784 true
785 )
786 );
788 "DESC",
790 $this->buildDescription($a_option["description"] ?? "", $a_node_id, $a_option["type"]),
791 $this->textwidth,
792 true
793 )
794 );
795 $frame_target = $this->buildFrameTarget($a_option["type"], $a_node_id, $a_option["obj_id"]);
796 if ($frame_target !== "") {
797 $tpl->setVariable("TARGET", " target=\"" . $frame_target . "\"");
798 }
799 } else { // output text only
800 $tpl->setCurrentBlock("text");
802 "OBJ_TITLE",
804 $this->buildTitle($a_option["title"], $a_node_id, $a_option["type"]),
805 $this->textwidth,
806 true
807 )
808 );
810 "OBJ_DESC",
812 $this->buildDescription($a_option["desc"], $a_node_id, $a_option["type"]),
813 $this->textwidth,
814 true
815 )
816 );
817 }
819
820 $tpl->setCurrentBlock("list_item");
822 $tpl->touchBlock("element");
823 }
isClickable(string $type, int $ref_id=0)
buildSelect($a_node_id, string $a_type)
standard implementation for adding an option select box between image and title
buildOnClick( $a_node_id, string $a_type, string $a_title)
getNodeStyleClass( $a_id, string $a_type)
buildTitle(string $a_title, $a_id, string $a_type)
getImageAlt(string $a_default_text, string $a_type="", $a_obj_id="")
buildFrameTarget(string $a_type, $a_child=0, $a_obj_id=0)
buildDescription(string $a_desc, $a_id, string $a_type)
getImage(string $a_name, string $a_type="", $a_obj_id="")
buildLinkTarget( $a_node_id, string $a_type)
ilLanguage $lng
createTarget(string $a_type, $a_node_id, bool $a_highlighted_subtree=false, bool $a_append_anch=true)
ilGlobalTemplateInterface $tpl
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static shortenTextExtended(string $a_str, int $a_len, bool $a_dots=false, bool $a_next_blank=false, bool $a_keep_extension=false)
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
setVariable(string $variable, $value='')
Sets the given variable to the given value.
touchBlock(string $block)
overwrites ITX::touchBlock.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.

References $ilErr.

◆ getAsynchExpanding()

ilExplorer::getAsynchExpanding ( )

Definition at line 155 of file class.ilExplorer.php.

155 : bool
156 {
158 }

References $asnch_expanding.

◆ getChildsOfNode()

ilExplorer::getChildsOfNode (   $a_parent_id)

Definition at line 360 of file class.ilExplorer.php.

360 : array
361 {
362 return $this->tree->getChilds($a_parent_id, $this->order_column);
363 }

◆ getFilterMode()

ilExplorer::getFilterMode ( )
Returns
int filter mode IL_FM_NEGATIVE | IL_FM_NEGATIVE

Definition at line 341 of file class.ilExplorer.php.

341 : int
342 {
343 return $this->filter_mode;
344 }

◆ getId()

ilExplorer::getId ( )

Definition at line 145 of file class.ilExplorer.php.

145 : string
146 {
147 return $this->id;
148 }

References $id.

◆ getImage()

ilExplorer::getImage ( string  $a_name,
string  $a_type = "",
  $a_obj_id = "" 
)

Reimplemented in ilRepositoryExplorer.

Definition at line 825 of file class.ilExplorer.php.

829 : string {
830 return ilUtil::getImagePath($a_name);
831 }
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)

Referenced by ilECSNodeMappingCmsExplorer\formatObject(), and ilECSNodeMappingLocalExplorer\formatObject().

+ Here is the caller graph for this function:

◆ getImageAlt()

ilExplorer::getImageAlt ( string  $a_default_text,
string  $a_type = "",
  $a_obj_id = "" 
)

Definition at line 833 of file class.ilExplorer.php.

837 : string {
838 return $a_default_text;
839 }

◆ getIndex()

ilExplorer::getIndex ( array  $a_data)

Definition at line 985 of file class.ilExplorer.php.

985 : int
986 {
987 if (!is_array($this->format_options)) {
988 return -1;
989 }
990
991 foreach ($this->format_options as $key => $value) {
992 if (($value["child"] == $a_data["parent"])) {
993 return $key;
994 }
995 }
996
997 return -1;
998 }

◆ getMaximumTreeDepth()

ilExplorer::getMaximumTreeDepth ( )

Definition at line 514 of file class.ilExplorer.php.

514 : int
515 {
516 $this->tree->getMaximumDepth();
517 return 0; // seems to not return the value...
518 }

◆ getNodeStyleClass()

ilExplorer::getNodeStyleClass (   $a_id,
string  $a_type 
)

Definition at line 841 of file class.ilExplorer.php.

844 : string {
845 if ($a_id == $this->highlighted) {
846 return "il_HighlightedNode";
847 }
848 return "";
849 }

Referenced by ilECSNodeMappingCmsExplorer\formatObject(), and ilECSNodeMappingLocalExplorer\formatObject().

+ Here is the caller graph for this function:

◆ getOutput()

ilExplorer::getOutput ( )

Definition at line 521 of file class.ilExplorer.php.

521 : string
522 {
525
526 $this->format_options[0]["tab"] = array();
527
528 $depth = $this->getMaximumTreeDepth();
529
530 for ($i = 0;$i < $depth;++$i) {
531 $this->createLines($i);
532 }
533
535 $tpl->addJavaScript("assets/js/ilExplorer.js");
536
537 //echo "hh";
538 // set global body class
539 // $tpl->setBodyClass("il_Explorer");
540
541 $tpl_tree = new ilTemplate("tpl.tree.html", true, true, "components/ILIAS/UIComponent/Explorer");
542
543 // updater
544 if (($this->requestStr("ict") !== "" ||
545 $this->requestStr("collapseAll") !== "" ||
546 $this->requestStr("expandAll") !== "") && $this->up_frame !== "") {
547 $tpl_tree->setCurrentBlock("updater");
548 $tpl_tree->setVariable("UPDATE_FRAME", $this->up_frame);
549 $tpl_tree->setVariable("UPDATE_SCRIPT", $this->up_script);
550 if (is_array($this->up_params)) {
551 $up_str = $lim = "";
552 foreach ($this->up_params as $p) {
553 $up_str .= $lim . "'" . $p . "'";
554 $lim = ",";
555 }
556 $tpl_tree->setVariable("UPDATE_PARAMS", $up_str);
557 }
558 $tpl_tree->parseCurrentBlock();
559 }
560 $cur_depth = -1;
561 foreach ($this->format_options as $key => $options) {
562 //echo "-".$options["depth"]."-";
563 if (!($options["visible"] ?? false)) {
564 continue;
565 }
566
567 // end tags
568 $this->handleListEndTags($tpl_tree, $cur_depth, $options["depth"]);
569
570 // start tags
571 $this->handleListStartTags($tpl_tree, $cur_depth, $options["depth"]);
572
573 $cur_depth = $options["depth"];
574
575 if ($options["visible"] and $key != 0) {
576 $this->formatObject($tpl_tree, $options["child"], $options, $options['obj_id']);
577 }
578 if ($key == 0) {
579 $this->formatHeader($tpl_tree, $options["child"], $options);
580 }
581 }
582
583 $this->handleListEndTags($tpl_tree, $cur_depth, -1);
584
585 $tpl_tree->setVariable("TREE_LEAD", "");
586 if ($this->tree_lead !== "") {
587 $tpl_tree->setCurrentBlock("tree_lead");
588 $tpl_tree->setVariable("TREE_LEAD", $this->tree_lead);
589 $tpl_tree->parseCurrentBlock();
590 }
591 if ($this->getId() !== "") {
592 $tpl_tree->setVariable("TREE_ID", 'id="' . $this->getId() . '_tree"');
593 }
594
595 $html = $tpl_tree->get();
596
597 if ($this->getUseStandardFrame()) {
598 $mtpl = new ilGlobalTemplate("tpl.main.html", true, true);
599 $mtpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
600 $mtpl->setVariable("BODY_CLASS", "il_Explorer");
601 $mtpl->addBlockFile("CONTENT", "content", "tpl.explorer.html");
602 if ($this->getTitle() !== "") {
603 $mtpl->setVariable("TXT_EXPLORER_HEADER", $this->getTitle());
604 }
605 if ($this->getId() !== "") {
606 $mtpl->setVariable("ID", 'id="' . $this->getId() . '"');
607 }
608 $mtpl->setVariable("IMG_SPACE", ilUtil::getImagePath("media/spacer.png", false));
609 $mtpl->setCurrentBlock("content");
610 $mtpl->setVariable("EXPLORER", $html);
611 $mtpl->setVariable("EXP_REFRESH", $lng->txt("refresh"));
612 $mtpl->parseCurrentBlock();
613 $html = $mtpl->get();
614 }
615
616 return $html;
617 }
handleListStartTags(ilTemplate $a_tpl_tree, int $a_cur_depth, int $a_item_depth)
handle list start tags (
formatHeader(ilTemplate $tpl, $a_obj_id, array $a_option)
handleListEndTags(ilTemplate $a_tpl_tree, int $a_cur_depth, int $a_item_depth)
handle list end tags ( and )
requestStr(string $key)
formatObject(ilTemplate $tpl, $a_node_id, array $a_option, $a_obj_id=0)
createLines(int $a_depth)
special template class to simplify handling of ITX/PEAR
special template class to simplify handling of ITX/PEAR
static getStyleSheetLocation(string $mode="output", string $a_css_name="")
get full style sheet file name (path inclusive) of current user
static initConnection(?ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Connection module.
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.

References $lng, ILIAS\UICore\GlobalTemplate\addJavaScript(), ILIAS\Survey\Mode\getId(), ilUtil\getImagePath(), ilUtil\getStyleSheetLocation(), ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle(), and ilYuiUtil\initConnection().

+ Here is the call graph for this function:

◆ getRoot()

ilExplorer::getRoot ( )

Definition at line 191 of file class.ilExplorer.php.

191 : ?int
192 {
193 return $this->root_id ?? $this->tree->getRootId();
194 }

Referenced by ilECSNodeMappingCmsExplorer\formatHeader().

+ Here is the caller graph for this function:

◆ getTitle()

ilExplorer::getTitle ( )

Definition at line 180 of file class.ilExplorer.php.

180 : string
181 {
182 return $this->title;
183 }

References $title.

◆ getTitleLength()

ilExplorer::getTitleLength ( )

Definition at line 175 of file class.ilExplorer.php.

175 : int
176 {
177 return $this->textwidth;
178 }

References $textwidth.

◆ getTreeLead()

ilExplorer::getTreeLead ( )

Definition at line 311 of file class.ilExplorer.php.

311 : string
312 {
313 return $this->tree_lead;
314 }

◆ getUseStandardFrame()

ilExplorer::getUseStandardFrame ( )

Definition at line 355 of file class.ilExplorer.php.

355 : bool
356 {
358 }
bool $use_standard_frame

◆ handleListEndTags()

ilExplorer::handleListEndTags ( ilTemplate  $a_tpl_tree,
int  $a_cur_depth,
int  $a_item_depth 
)

handle list end tags ( and )

Definition at line 624 of file class.ilExplorer.php.

628 : void {
629 if ($a_item_depth < $a_cur_depth) {
630 // </li></ul> for ending lists
631 for ($i = 0; $i < ($a_cur_depth - $a_item_depth); $i++) {
632 $a_tpl_tree->touchBlock("end_list_item");
633 $a_tpl_tree->touchBlock("element");
634
635 $a_tpl_tree->touchBlock("end_list");
636 $a_tpl_tree->touchBlock("element");
637 }
638 } elseif ($a_item_depth == $a_cur_depth) {
639 // </li> for ending list items
640 $a_tpl_tree->touchBlock("end_list_item");
641 $a_tpl_tree->touchBlock("element");
642 }
643 }
touchBlock(string $block)

References ilTemplate\touchBlock().

+ Here is the call graph for this function:

◆ handleListStartTags()

ilExplorer::handleListStartTags ( ilTemplate  $a_tpl_tree,
int  $a_cur_depth,
int  $a_item_depth 
)

handle list start tags (

)

Definition at line 648 of file class.ilExplorer.php.

652 : void {
653 // start tags
654 if ($a_item_depth > $a_cur_depth) {
655 // <ul><li> for new lists
656 if ($a_item_depth > 1) {
657 $a_tpl_tree->touchBlock("start_list");
658 } else {
659 $a_tpl_tree->touchBlock("start_list_no_indent");
660 }
661 $a_tpl_tree->touchBlock("element");
662 }
663 $a_tpl_tree->touchBlock("start_list_item");
664 $a_tpl_tree->touchBlock("element");
665 }

References ilTemplate\touchBlock().

+ Here is the call graph for this function:

◆ highlightNode()

ilExplorer::highlightNode ( string  $a_id)

Definition at line 261 of file class.ilExplorer.php.

261 : void
262 {
263 $this->highlighted = $a_id;
264 }

◆ initItemCounter()

ilExplorer::initItemCounter ( int  $a_number)

Definition at line 160 of file class.ilExplorer.php.

160 : void
161 {
162 $this->counter = $a_number;
163 }

◆ is_in_array()

ilExplorer::is_in_array ( int  $a_start,
int  $a_depth 
)

Definition at line 968 of file class.ilExplorer.php.

971 : bool {
972 for ($i = $a_start, $iMax = count($this->format_options); $i < $iMax; ++$i) {
973 if ($this->format_options[$i]["depth"] < $a_depth) {
974 break;
975 }
976
977 if ($this->format_options[$i]["depth"] == $a_depth) {
978 return true;
979 }
980 }
981 return false;
982 }

◆ isClickable()

ilExplorer::isClickable ( string  $type,
int  $ref_id = 0 
)

Reimplemented in ilContainerSelectionExplorer, ilPasteIntoMultipleItemsExplorer, ilRepositoryExplorer, ilSCORMExplorer, ilSearchRootSelector, ilSolutionExplorer, ilECSNodeMappingCmsExplorer, and ilECSNodeMappingLocalExplorer.

Definition at line 317 of file class.ilExplorer.php.

320 : bool {
321 // in this standard implementation
322 // only the type determines, wether an object should be clickable or not
323 // but this method can be overwritten and make $exp->setFilterMode(IL_FM_NEGATIVE);use of the ref id
324 // (this happens e.g. in class ilRepositoryExplorerGUI)
325 return $this->is_clickable[$type] !== "n";
326 }

◆ isVisible()

ilExplorer::isVisible (   $a_ref_id,
string  $a_type 
)

Reimplemented in ilContainerSelectionExplorer, ilRepositoryExplorer, ilSCORMExplorer, and ilPasteIntoMultipleItemsExplorer.

Definition at line 290 of file class.ilExplorer.php.

293 : bool {
295
296 if (!$this->rbac_check) {
297 return true;
298 }
299
300 $visible = $rbacsystem->checkAccess('visible', $a_ref_id);
301
302 return $visible;
303 }
ilRbacSystem $rbacsystem
checkAccess(string $a_operations, int $a_ref_id, string $a_type="")
checkAccess represents the main method of the RBAC-system in ILIAS3 developers want to use With this ...

◆ modifyChilds()

ilExplorer::modifyChilds (   $a_parent_id,
array  $a_objects 
)

Definition at line 489 of file class.ilExplorer.php.

492 : array {
493 return $a_objects;
494 }

◆ outputIcons()

ilExplorer::outputIcons ( bool  $a_icons)

Definition at line 276 of file class.ilExplorer.php.

276 : void
277 {
278 $this->output_icons = $a_icons;
279 }

Referenced by ilSCORMExplorer\__construct().

+ Here is the caller graph for this function:

◆ requestStr()

ilExplorer::requestStr ( string  $key)
protected

Definition at line 128 of file class.ilExplorer.php.

128 : string
129 {
130 $str = $this->refinery->kindlyTo()->string();
131 if ($this->wrapper->post()->has($key)) {
132 return $this->wrapper->post()->retrieve($key, $str);
133 }
134 if ($this->wrapper->query()->has($key)) {
135 return $this->wrapper->query()->retrieve($key, $str);
136 }
137 return "";
138 }

References ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ setAsynchExpanding()

ilExplorer::setAsynchExpanding ( bool  $a_val)

Definition at line 150 of file class.ilExplorer.php.

150 : void
151 {
152 $this->asnch_expanding = $a_val;
153 }

◆ setClickable()

ilExplorer::setClickable ( string  $a_type,
bool  $a_clickable 
)

Definition at line 281 of file class.ilExplorer.php.

281 : void
282 {
283 if ($a_clickable) {
284 $this->is_clickable[$a_type] = "";
285 } else {
286 $this->is_clickable[$a_type] = "n";
287 }
288 }

◆ setExpand()

ilExplorer::setExpand (   $a_node_id)

set the expand option this value is stored in a SESSION variable to save it different view (lo view, frm view,...)

Definition at line 1045 of file class.ilExplorer.php.

1045 : void
1046 {
1047 // IF ISN'T SET CREATE SESSION VARIABLE
1048 if (!is_array(ilSession::get($this->expand_variable))) {
1049 ilSession::set($this->expand_variable, [$this->getRoot()]);
1050 }
1051 if ($a_node_id > 0 && !in_array($a_node_id, ilSession::get($this->expand_variable))) {
1052 $exp = ilSession::get($this->expand_variable);
1053 $exp[] = $a_node_id;
1054 ilSession::set($this->expand_variable, $exp);
1055 }
1056 if ($a_node_id < 0) {
1057 $key = array_keys(ilSession::get($this->expand_variable), -(int) $a_node_id);
1058 $exp = ilSession::get($this->expand_variable);
1059 if (isset($key[0]) && isset($exp[$key[0]])) {
1060 unset($exp[$key[0]]);
1061 }
1062 ilSession::set($this->expand_variable, $exp);
1063 }
1064 $this->expanded = (array) ilSession::get($this->expand_variable);
1065 }
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.

References ilSession\get(), and ilSession\set().

Referenced by ilSearchRootSelector\setPathOpen().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setExpandTarget()

ilExplorer::setExpandTarget ( string  $a_exp_target)

target script for expand icons

Parameters
string$a_exp_targetscript name of target script(may include parameters) initially set to $_SERVER["PATH_INFO"]

Definition at line 245 of file class.ilExplorer.php.

245 : void
246 {
247 $this->expand_target = $a_exp_target;
248 }

◆ setFiltered()

ilExplorer::setFiltered ( bool  $a_bool)

Definition at line 1079 of file class.ilExplorer.php.

1079 : bool
1080 {
1081 $this->filtered = $a_bool;
1082 return true;
1083 }

Referenced by ilSearchRootSelector\__construct(), ilSolutionExplorer\__construct(), ilPasteIntoMultipleItemsExplorer\__construct(), ilContainerSelectionExplorer\__construct(), and ilECSNodeMappingLocalExplorer\__construct().

+ Here is the caller graph for this function:

◆ setFilterMode()

ilExplorer::setFilterMode ( int  $a_mode = IL_FM_NEGATIVE)

Definition at line 333 of file class.ilExplorer.php.

333 : void
334 {
335 $this->filter_mode = $a_mode;
336 }

Referenced by ilSearchRootSelector\__construct(), ilSolutionExplorer\__construct(), ilPasteIntoMultipleItemsExplorer\__construct(), ilContainerSelectionExplorer\__construct(), and ilECSNodeMappingLocalExplorer\__construct().

+ Here is the caller graph for this function:

◆ setFrameTarget()

ilExplorer::setFrameTarget ( string  $a_target)

Definition at line 938 of file class.ilExplorer.php.

938 : void
939 {
940 $this->frame_target = $a_target;
941 }

◆ setFrameUpdater()

ilExplorer::setFrameUpdater ( string  $a_up_frame,
string  $a_up_script,
string  $a_params = "" 
)

Definition at line 250 of file class.ilExplorer.php.

254 : void {
255 $this->up_frame = $a_up_frame;
256 $this->up_script = $a_up_script;
257 $this->up_params = $a_params;
258 }
string $a_up_script

◆ setId()

ilExplorer::setId ( string  $a_val)

Definition at line 140 of file class.ilExplorer.php.

140 : void
141 {
142 $this->id = $a_val;
143 }

Referenced by ilPasteIntoMultipleItemsExplorer\__construct().

+ Here is the caller graph for this function:

◆ setOrderColumn()

ilExplorer::setOrderColumn ( string  $a_column)

Definition at line 196 of file class.ilExplorer.php.

196 : void
197 {
198 $this->order_column = $a_column;
199 }

Referenced by ilSCORMExplorer\__construct(), ilECSNodeMappingCmsExplorer\__construct(), and ilECSNodeMappingLocalExplorer\__construct().

+ Here is the caller graph for this function:

◆ setOrderDirection()

ilExplorer::setOrderDirection ( string  $a_direction)

Definition at line 201 of file class.ilExplorer.php.

201 : void
202 {
203 if ($a_direction === "desc") {
204 $this->order_direction = $a_direction;
205 } else {
206 $this->order_direction = "asc";
207 }
208 }

◆ setOutput()

ilExplorer::setOutput (   $a_parent_id,
int  $a_depth = 1,
int  $a_obj_id = 0,
bool  $a_highlighted_subtree = false 
)

Creates output for explorer view in admin menue recursive method.

Definition at line 370 of file class.ilExplorer.php.

375 : void {
377
378 $parent_index = 0;
379
380 if (!isset($a_parent_id)) {
381 $ilErr->raiseError(get_class($this) . "::setOutput(): No node_id given!", $ilErr->WARNING);
382 }
383
384 if ($this->showChilds($a_parent_id)) {
385 $objects = $this->getChildsOfNode($a_parent_id);
386 } else {
387 $objects = array();
388 }
389
390 $objects = $this->modifyChilds($a_parent_id, $objects);
391
392 // force expansion (of single nodes)
393 if ($this->forceExpanded($a_parent_id) && !in_array($a_parent_id, $this->expanded)) {
394 $this->expanded[] = $a_parent_id;
395 }
396
397 if (count($objects) > 0) {
398 // Maybe call a lexical sort function for the child objects
399 $tab = ++$a_depth - 2;
400 if ($this->post_sort) {
401 $objects = $this->sortNodes($objects, $a_obj_id);
402 }
403 $skip_rest = false;
404 foreach ($objects as $key => $object) {
405 // skip childs, if parent is not expanded
406 if (!$this->forceExpanded($object["child"]) && $skip_rest) {
407 continue;
408 }
409 //echo "<br>-".$object["child"]."-".$this->forceExpanded($object["child"])."-";
410 //ask for FILTER
411 if ($this->filtered === false || $this->checkFilter($object["type"]) === false) {
412 if ($this->isVisible($object['child'], $object['type'])) {
413 #echo 'CHILD getIndex() '.$object['child'].' parent: '.$this->getRoot();
414 if ($object["child"] != $this->getRoot()) {
415 $parent_index = $this->getIndex($object);
416 }
417 $this->format_options[(string) $this->counter]["parent"] = $object["parent"];
418 $this->format_options[(string) $this->counter]["child"] = $object["child"];
419 $this->format_options[(string) $this->counter]["title"] = $object["title"];
420 $this->format_options[(string) $this->counter]["type"] = $object["type"];
421 $this->format_options[(string) $this->counter]["obj_id"] = $object["obj_id"];
422 $this->format_options[(string) $this->counter]["desc"] = "obj_" . $object["type"];
423 $this->format_options[(string) $this->counter]["depth"] = $tab;
424 $this->format_options[(string) $this->counter]["container"] = false;
425 $this->format_options[(string) $this->counter]["visible"] = true;
426 $this->format_options[(string) $this->counter]["highlighted_subtree"] = $a_highlighted_subtree;
427
428 // Create prefix array
429 for ($i = 0; $i < $tab; ++$i) {
430 $this->format_options[(string) $this->counter]["tab"][] = 'blank';
431 }
432
433 // fix explorer (sometimes explorer disappears)
434 if ($parent_index === 0) {
435 if (!$this->expand_all && !in_array($object["parent"], $this->expanded)) {
436 $this->expanded[] = $object["parent"];
437 }
438 }
439
440 // only if parent is expanded and visible, object is visible
441 if ($object["child"] != $this->getRoot() && ((!$this->expand_all && !in_array($object["parent"], $this->expanded))
442 or !$this->format_options[(string) $parent_index]["visible"])) {
443 if (!$this->forceExpanded($object["child"])) {
444 // if parent is not expanded, and one child is
445 // visible we don't need more information and
446 // can skip the rest of the childs
447 if ($this->format_options[(string) $this->counter]["visible"]) {
448 //echo "-setSkipping";
449 $skip_rest = true;
450 }
451 $this->format_options[(string) $this->counter]["visible"] = false;
452 }
453 }
454
455 // if object exists parent is container
456 if ($object["child"] != $this->getRoot()) {
457 $this->format_options[(string) $parent_index]["container"] = true;
458
459 if ($this->expand_all || in_array($object["parent"], $this->expanded)) {
460 //echo "<br>-".$object["child"]."-".$this->forceExpanded($object["child"])."-";
461 if ($this->forceExpanded($object["parent"])) {
462 $this->format_options[(string) $parent_index]["tab"][($tab - 2)] = 'forceexp';
463 } else {
464 $this->format_options[(string) $parent_index]["tab"][($tab - 2)] = 'minus';
465 }
466 } else {
467 $this->format_options[(string) $parent_index]["tab"][($tab - 2)] = 'plus';
468 }
469 }
470 //echo "-"."$parent_index"."-";
471 //var_dump($this->format_options["$parent_index"]);
473
474 // stop recursion if 2. level beyond expanded nodes is reached
475 if ($this->expand_all || in_array($object["parent"], $this->expanded) or ($object["parent"] == 0)
476 or $this->forceExpanded($object["child"])) {
477 $highlighted_subtree = $a_highlighted_subtree ||
478 ($object["child"] == $this->highlighted);
479
480 // recursive
481 $this->setOutput($object["child"], $a_depth, $object['obj_id'], $highlighted_subtree);
482 }
483 } //if
484 } //if FILTER
485 } //foreach
486 } //if
487 } //function
showChilds($a_parent_id)
determines wether the childs of an object should be shown or not note: this standard implementation a...
modifyChilds( $a_parent_id, array $a_objects)
string $highlighted
checkFilter(string $a_item)
getIndex(array $a_data)
getChildsOfNode($a_parent_id)
forceExpanded($a_obj_id)
force expansion of node
setOutput( $a_parent_id, int $a_depth=1, int $a_obj_id=0, bool $a_highlighted_subtree=false)
Creates output for explorer view in admin menue recursive method.
sortNodes(array $a_nodes, $a_parent_obj_id)
sort nodes and put adm object to the end of sorted array
isVisible( $a_ref_id, string $a_type)

References $ilErr.

◆ setParamsGet()

ilExplorer::setParamsGet ( array  $a_params_get)

Definition at line 224 of file class.ilExplorer.php.

224 : void
225 {
227
228 if (!isset($a_params_get) or !is_array($a_params_get)) {
229 $ilErr->raiseError(get_class($this) . "::setTargetGet(): No target given!", $ilErr->WARNING);
230 }
231 $str = "";
232 foreach ($a_params_get as $key => $val) {
233 $str .= "&" . $key . "=" . $val;
234 }
235
236 $this->params_get = $str;
237 }

References $error, and $ilErr.

Referenced by ilECSNodeMappingLocalExplorer\formatObject().

+ Here is the caller graph for this function:

◆ setPostSort()

ilExplorer::setPostSort ( bool  $a_sort)

Definition at line 328 of file class.ilExplorer.php.

328 : void
329 {
330 $this->post_sort = $a_sort;
331 }

◆ setRoot()

ilExplorer::setRoot (   $a_root_id)

Definition at line 185 of file class.ilExplorer.php.

185 : void
186 {
187 #$this->tree = new ilTree(ROOT_FOLDER_ID,$a_root_id);
188 $this->root_id = $a_root_id;
189 }

Referenced by ilECSNodeMappingLocalExplorer\__construct().

+ Here is the caller graph for this function:

◆ setSessionExpandVariable()

ilExplorer::setSessionExpandVariable ( string  $a_var_name = "expand")

Definition at line 271 of file class.ilExplorer.php.

271 : void
272 {
273 $this->expand_variable = $a_var_name;
274 }

Referenced by ilSearchRootSelector\__construct(), ilSolutionExplorer\__construct(), ilPasteIntoMultipleItemsExplorer\__construct(), and ilContainerSelectionExplorer\__construct().

+ Here is the caller graph for this function:

◆ setTargetGet()

ilExplorer::setTargetGet ( string  $a_target_get)
Parameters
string$a_target_getvarname containing Ids to be used in GET-string

Definition at line 213 of file class.ilExplorer.php.

213 : void
214 {
216
217 if (!isset($a_target_get) or !is_string($a_target_get)) {
218 $ilErr->raiseError(get_class($this) . "::setTargetGet(): No target given!", $ilErr->WARNING);
219 }
220
221 $this->target_get = $a_target_get;
222 }

References $error, and $ilErr.

◆ setTitle()

ilExplorer::setTitle ( string  $a_val)

Definition at line 165 of file class.ilExplorer.php.

165 : void
166 {
167 $this->title = $a_val;
168 }

◆ setTitleLength()

ilExplorer::setTitleLength ( int  $a_length)

Definition at line 170 of file class.ilExplorer.php.

170 : void
171 {
172 $this->textwidth = $a_length;
173 }

Referenced by ilSearchRootSelector\__construct(), ilContainerSelectionExplorer\__construct(), and ilECSNodeMappingCmsExplorer\__construct().

+ Here is the caller graph for this function:

◆ setTreeLead()

ilExplorer::setTreeLead ( string  $a_val)

Definition at line 306 of file class.ilExplorer.php.

306 : void
307 {
308 $this->tree_lead = $a_val;
309 }

◆ setUseStandardFrame()

ilExplorer::setUseStandardFrame ( bool  $a_val)

Set use standard frame.

If true, the standard explorer frame (like in the repository) is put around the tree.

Definition at line 350 of file class.ilExplorer.php.

350 : void
351 {
352 $this->use_standard_frame = $a_val;
353 }

◆ showChilds()

ilExplorer::showChilds (   $a_parent_id)

determines wether the childs of an object should be shown or not note: this standard implementation always returns true but it could be overwritten by derived classes (e.g.

ilRepositoryExplorerGUI)

Reimplemented in ilSearchRootSelector, and ilSolutionExplorer.

Definition at line 501 of file class.ilExplorer.php.

501 : bool
502 {
503 return true;
504 }

Referenced by ilSCORMExplorer\createOutputArray().

+ Here is the caller graph for this function:

◆ sortNodes()

ilExplorer::sortNodes ( array  $a_nodes,
  $a_parent_obj_id 
)

sort nodes and put adm object to the end of sorted array

Reimplemented in ilRepositoryExplorer.

Definition at line 1107 of file class.ilExplorer.php.

1107 : array
1108 {
1109 $adm_node = null;
1110 foreach ($a_nodes as $key => $node) {
1111 if ($node["type"] === "adm") {
1112 $match = $key;
1113 $adm_node = $node;
1114 break;
1115 }
1116 }
1117
1118 // cut off adm node
1119 if (isset($match)) {
1120 array_splice($a_nodes, $match, 1);
1121 }
1122
1123 $a_nodes = ilArrayUtil::sortArray($a_nodes, $this->order_column, $this->order_direction);
1124
1125 // append adm node to end of list
1126 if (isset($match)) {
1127 $a_nodes[] = $adm_node;
1128 }
1129
1130 return $a_nodes;
1131 }
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)

References ilArrayUtil\sortArray().

+ Here is the call graph for this function:

Field Documentation

◆ $a_up_script

string ilExplorer::$a_up_script = ""
protected

Definition at line 67 of file class.ilExplorer.php.

◆ $asnch_expanding

bool ilExplorer::$asnch_expanding = false
protected

Definition at line 63 of file class.ilExplorer.php.

Referenced by getAsynchExpanding().

◆ $counter

int ilExplorer::$counter = 0
protected

Definition at line 62 of file class.ilExplorer.php.

◆ $error

ilErrorHandling ilExplorer::$error
protected

Definition at line 32 of file class.ilExplorer.php.

Referenced by setParamsGet(), and setTargetGet().

◆ $expand_all

bool ilExplorer::$expand_all = false

Definition at line 57 of file class.ilExplorer.php.

◆ $expand_target

string ilExplorer::$expand_target = null

Definition at line 46 of file class.ilExplorer.php.

◆ $expand_variable

string ilExplorer::$expand_variable = ""

Definition at line 49 of file class.ilExplorer.php.

◆ $expanded

array ilExplorer::$expanded = []

Definition at line 43 of file class.ilExplorer.php.

◆ $filter

ilExplorer::$filter = []
protected

Definition at line 54 of file class.ilExplorer.php.

◆ $filter_mode

bool ilExplorer::$filter_mode

Definition at line 55 of file class.ilExplorer.php.

◆ $filtered

bool ilExplorer::$filtered = false

Definition at line 53 of file class.ilExplorer.php.

◆ $format_options

array ilExplorer::$format_options = []

Definition at line 38 of file class.ilExplorer.php.

◆ $frame_target

string ilExplorer::$frame_target = ""
protected

◆ $highlighted

string ilExplorer::$highlighted = ""
protected

Definition at line 60 of file class.ilExplorer.php.

◆ $iconList

array ilExplorer::$iconList = []
protected

Definition at line 72 of file class.ilExplorer.php.

◆ $id

string ilExplorer::$id = ""

Definition at line 36 of file class.ilExplorer.php.

Referenced by getId(), and ilSearchRootSelector\setPathOpen().

◆ $is_clickable

array ilExplorer::$is_clickable = []

Definition at line 51 of file class.ilExplorer.php.

◆ $lng

◆ $obj_definition

ilObjectDefinition ilExplorer::$obj_definition
protected

Definition at line 31 of file class.ilExplorer.php.

Referenced by ilRepositoryExplorer\sortNodes().

◆ $order_column

string ilExplorer::$order_column = ""

Definition at line 44 of file class.ilExplorer.php.

◆ $order_direction

string ilExplorer::$order_direction = "asc"

Definition at line 45 of file class.ilExplorer.php.

◆ $output

string ilExplorer::$output = ""

Definition at line 37 of file class.ilExplorer.php.

◆ $output_icons

bool ilExplorer::$output_icons = false

Definition at line 48 of file class.ilExplorer.php.

◆ $params_get

string ilExplorer::$params_get = ""

Definition at line 42 of file class.ilExplorer.php.

◆ $post_sort

bool ilExplorer::$post_sort = false

Definition at line 52 of file class.ilExplorer.php.

◆ $rbac_check

bool ilExplorer::$rbac_check = false

Definition at line 47 of file class.ilExplorer.php.

◆ $rbacsystem

ilRbacSystem ilExplorer::$rbacsystem
protected

◆ $refinery

ILIAS Refinery Factory ilExplorer::$refinery
protected

Definition at line 74 of file class.ilExplorer.php.

◆ $root_id

ilExplorer::$root_id = null

Definition at line 58 of file class.ilExplorer.php.

◆ $show_minus

bool ilExplorer::$show_minus = true
protected

Definition at line 61 of file class.ilExplorer.php.

◆ $target

◆ $target_get

string ilExplorer::$target_get = ""

Definition at line 41 of file class.ilExplorer.php.

◆ $textwidth

int ilExplorer::$textwidth = 0
protected

Definition at line 64 of file class.ilExplorer.php.

Referenced by getTitleLength().

◆ $title

◆ $tpl

◆ $tree

◆ $tree_lead

string ilExplorer::$tree_lead = ""
protected

Definition at line 71 of file class.ilExplorer.php.

◆ $up_frame

string ilExplorer::$up_frame = ""
protected

Definition at line 66 of file class.ilExplorer.php.

◆ $up_params

string ilExplorer::$up_params = ""
protected

Definition at line 68 of file class.ilExplorer.php.

◆ $up_script

string ilExplorer::$up_script = ""
protected

Definition at line 70 of file class.ilExplorer.php.

◆ $use_standard_frame

bool ilExplorer::$use_standard_frame = false

Definition at line 59 of file class.ilExplorer.php.

◆ $wrapper

ILIAS HTTP Wrapper WrapperFactory ilExplorer::$wrapper
protected

Definition at line 75 of file class.ilExplorer.php.


The documentation for this class was generated from the following file: