ILIAS  release_8 Revision v8.24
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:

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

Member Function Documentation

◆ addFilter()

ilExplorer::addFilter ( string  $a_item)

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

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

References ILIAS\UI\examples\Symbol\Glyph\Filter\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 876 of file class.ilExplorer.php.

880 : string {
881 return "";
882 }

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 ilSolutionExplorer, and ilSearchRootSelector.

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

896 : string {
897 return $this->frame_target;
898 }
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 ilSolutionExplorer, ilRepositoryExplorer, ilSearchRootSelector, and ilAsyncContainerSelectionExplorer.

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

853 : string {
854 $target = (strpos($this->target, "?") === false)
855 ? $this->target . "?"
856 : $this->target . "&";
857 return $target . $this->target_get . "=" . $a_node_id . $this->params_get;
858 }
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 
)

Reimplemented in ilAsyncContainerSelectionExplorer.

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

864 : string {
865 return "";
866 }

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 887 of file class.ilExplorer.php.

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

◆ buildTitle()

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

Reimplemented in ilECSNodeMappingCmsExplorer, and ilECSNodeMappingLocalExplorer.

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

872 : string {
873 return $a_title;
874 }

◆ checkFilter()

ilExplorer::checkFilter ( string  $a_item)

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

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

References ILIAS\UI\examples\Symbol\Glyph\Filter\filter(), and IL_FM_NEGATIVE.

+ Here is the call graph for this function:

◆ checkPermissions()

ilExplorer::checkPermissions ( bool  $a_check)

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

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

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

+ Here is the caller graph for this function:

◆ createLines()

ilExplorer::createLines ( int  $a_depth)

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

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

References $i.

◆ 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 901 of file class.ilExplorer.php.

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

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 1016 of file class.ilExplorer.php.

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

References ILIAS\UI\examples\Symbol\Glyph\Filter\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 1070 of file class.ilExplorer.php.

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

◆ forceExpanded()

ilExplorer::forceExpanded (   $a_obj_id)

force expansion of node

Reimplemented in ilRepositoryExplorer.

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

508 : bool
509 {
510 return false;
511 }

◆ 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 673 of file class.ilExplorer.php.

678 : void {
681
682 if (!isset($a_node_id) or !is_array($a_option)) {
683 $ilErr->raiseError(get_class($this) . "::formatObject(): Missing parameter or wrong datatype! " .
684 "node_id: " . $a_node_id . " options:" . var_export($a_option, true), $ilErr->WARNING);
685 }
686
687 $pic = false;
688 foreach ((array) $a_option["tab"] as $picture) {
689 if ($picture === 'plus') {
690 $tpl->setCurrentBlock("expander");
691 $tpl->setVariable("EXP_DESC", $lng->txt("collapsed"));
692 $tpl->setVariable("LINK_NAME", $a_node_id);
693 if (!$this->getAsynchExpanding()) {
694 $target = $this->createTarget('+', $a_node_id, $a_option["highlighted_subtree"]);
695 $tpl->setVariable("LINK_TARGET_EXPANDER", $target);
696 } else {
697 $target = $this->createTarget('+', $a_node_id, $a_option["highlighted_subtree"], false);
698 $tpl->setVariable("ONCLICK_TARGET_EXPANDER", " onclick=\"return il.Explorer.refresh('tree_div', '" . $target . "');\"");
699 $tpl->setVariable("LINK_TARGET_EXPANDER", "#");
700 }
701 $tpl->setVariable("IMGPATH", $this->getImage("browser/plus.png"));
702 $tpl->parseCurrentBlock();
703 $pic = true;
704 }
705
706 if ($picture === 'forceexp') {
707 $tpl->setCurrentBlock("expander");
708 $tpl->setVariable("EXP_DESC", $lng->txt("expanded"));
709 $target = $this->createTarget('+', $a_node_id);
710 $tpl->setVariable("LINK_NAME", $a_node_id);
711 $tpl->setVariable("LINK_TARGET_EXPANDER", $target);
712 $tpl->setVariable("IMGPATH", $this->getImage("browser/forceexp.png"));
713 $tpl->parseCurrentBlock();
714 $pic = true;
715 }
716
717 if ($picture === 'minus' && $this->show_minus) {
718 $tpl->setCurrentBlock("expander");
719 $tpl->setVariable("EXP_DESC", $lng->txt("expanded"));
720 $tpl->setVariable("LINK_NAME", $a_node_id);
721 if (!$this->getAsynchExpanding()) {
722 $target = $this->createTarget('-', $a_node_id, $a_option["highlighted_subtree"]);
723 $tpl->setVariable("LINK_TARGET_EXPANDER", $target);
724 } else {
725 $target = $this->createTarget('-', $a_node_id, $a_option["highlighted_subtree"], false);
726 $tpl->setVariable("ONCLICK_TARGET_EXPANDER", " onclick=\"return il.Explorer.refresh('tree_div', '" . $target . "');\"");
727 $tpl->setVariable("LINK_TARGET_EXPANDER", "#");
728 }
729 $tpl->setVariable("IMGPATH", $this->getImage("browser/minus.png"));
730 $tpl->parseCurrentBlock();
731 $pic = true;
732 }
733 }
734
735 if (!$pic) {
736 $tpl->setCurrentBlock("blank");
737 $tpl->setVariable("BLANK_PATH", $this->getImage("browser/blank.png"));
738 $tpl->parseCurrentBlock();
739 }
740
741 if ($this->output_icons) {
742 $tpl->setCurrentBlock("icon");
743 $tpl->setVariable("ICON_IMAGE", $this->getImage("icon_" . $a_option["type"] . ".svg", $a_option["type"], $a_obj_id));
744
745 $tpl->setVariable("TARGET_ID", "iconid_" . $a_node_id);
746 $this->iconList[] = "iconid_" . $a_node_id;
748 "TXT_ALT_IMG",
749 $this->getImageAlt($lng->txt("icon") . " " . $lng->txt($a_option["desc"]), $a_option["type"], $a_obj_id)
750 );
752 }
753
754 if (($sel = $this->buildSelect($a_node_id, $a_option['type'])) !== '') {
755 $tpl->setCurrentBlock('select');
756 $tpl->setVariable('OBJ_SEL', $sel);
758 }
759
760 if ($this->isClickable($a_option["type"], $a_node_id)) { // output link
761 $tpl->setCurrentBlock("link");
762 //$target = (strpos($this->target, "?") === false) ?
763 // $this->target."?" : $this->target."&";
764 //$tpl->setVariable("LINK_TARGET", $target.$this->target_get."=".$a_node_id.$this->params_get);
765 $tpl->setVariable("LINK_TARGET", $this->buildLinkTarget($a_node_id, $a_option["type"]));
766
767 $style_class = $this->getNodeStyleClass($a_node_id, $a_option["type"]);
768
769 if ($style_class !== "") {
770 $tpl->setVariable("A_CLASS", ' class="' . $style_class . '" ');
771 }
772
773 if (($onclick = $this->buildOnClick($a_node_id, $a_option["type"], $a_option["title"])) != "") {
774 $tpl->setVariable("ONCLICK", "onClick=\"$onclick\"");
775 }
776
777 //$tpl->setVariable("LINK_NAME", $a_node_id);
779 "TITLE",
781 $this->buildTitle($a_option["title"], $a_node_id, $a_option["type"]),
782 $this->textwidth,
783 true
784 )
785 );
787 "DESC",
789 $this->buildDescription($a_option["description"] ?? "", $a_node_id, $a_option["type"]),
790 $this->textwidth,
791 true
792 )
793 );
794 $frame_target = $this->buildFrameTarget($a_option["type"], $a_node_id, $a_option["obj_id"]);
795 if ($frame_target !== "") {
796 $tpl->setVariable("TARGET", " target=\"" . $frame_target . "\"");
797 }
798 } else { // output text only
799 $tpl->setCurrentBlock("text");
801 "OBJ_TITLE",
803 $this->buildTitle($a_option["title"], $a_node_id, $a_option["type"]),
804 $this->textwidth,
805 true
806 )
807 );
809 "OBJ_DESC",
811 $this->buildDescription($a_option["desc"], $a_node_id, $a_option["type"]),
812 $this->textwidth,
813 true
814 )
815 );
816 }
818
819 $tpl->setCurrentBlock("list_item");
821 $tpl->touchBlock("element");
822 }
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)
touchBlock(string $block)
overwrites ITX::touchBlock.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setVariable(string $variable, $value='')
Sets the given variable to the given value.

References $ilErr.

◆ getAsynchExpanding()

ilExplorer::getAsynchExpanding ( )

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

154 : bool
155 {
157 }

References $asnch_expanding.

◆ getChildsOfNode()

ilExplorer::getChildsOfNode (   $a_parent_id)

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

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

◆ getFilterMode()

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

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

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

◆ getId()

ilExplorer::getId ( )

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

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

References $id.

Referenced by ilAsyncContainerSelectionExplorer\initJs().

+ Here is the caller graph for this function:

◆ getImage()

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

Reimplemented in ilRepositoryExplorer.

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

828 : string {
829 return ilUtil::getImagePath($a_name);
830 }
static getImagePath(string $img, 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 832 of file class.ilExplorer.php.

836 : string {
837 return $a_default_text;
838 }

◆ getIndex()

ilExplorer::getIndex ( array  $a_data)

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

984 : int
985 {
986 if (!is_array($this->format_options)) {
987 return -1;
988 }
989
990 foreach ($this->format_options as $key => $value) {
991 if (($value["child"] == $a_data["parent"])) {
992 return $key;
993 }
994 }
995
996 return -1;
997 }
string $key
Consumer key/client ID value.
Definition: System.php:193

References ILIAS\LTI\ToolProvider\$key.

◆ getMaximumTreeDepth()

ilExplorer::getMaximumTreeDepth ( )

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

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

◆ getNodeStyleClass()

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

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

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

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

+ Here is the caller graph for this function:

◆ getOutput()

ilExplorer::getOutput ( )

Reimplemented in ilAsyncContainerSelectionExplorer.

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

520 : string
521 {
524
525 $this->format_options[0]["tab"] = array();
526
527 $depth = $this->getMaximumTreeDepth();
528
529 for ($i = 0;$i < $depth;++$i) {
530 $this->createLines($i);
531 }
532
534 $tpl->addJavaScript("./Services/UIComponent/Explorer/js/ilExplorer.js");
535
536 //echo "hh";
537 // set global body class
538 // $tpl->setBodyClass("il_Explorer");
539
540 $tpl_tree = new ilTemplate("tpl.tree.html", true, true, "Services/UIComponent/Explorer");
541
542 // updater
543 if (($this->requestStr("ict") !== "" ||
544 $this->requestStr("collapseAll") !== "" ||
545 $this->requestStr("expandAll") !== "") && $this->up_frame !== "") {
546 $tpl_tree->setCurrentBlock("updater");
547 $tpl_tree->setVariable("UPDATE_FRAME", $this->up_frame);
548 $tpl_tree->setVariable("UPDATE_SCRIPT", $this->up_script);
549 if (is_array($this->up_params)) {
550 $up_str = $lim = "";
551 foreach ($this->up_params as $p) {
552 $up_str .= $lim . "'" . $p . "'";
553 $lim = ",";
554 }
555 $tpl_tree->setVariable("UPDATE_PARAMS", $up_str);
556 }
557 $tpl_tree->parseCurrentBlock();
558 }
559 $cur_depth = -1;
560 foreach ($this->format_options as $key => $options) {
561 //echo "-".$options["depth"]."-";
562 if (!($options["visible"] ?? false)) {
563 continue;
564 }
565
566 // end tags
567 $this->handleListEndTags($tpl_tree, $cur_depth, $options["depth"]);
568
569 // start tags
570 $this->handleListStartTags($tpl_tree, $cur_depth, $options["depth"]);
571
572 $cur_depth = $options["depth"];
573
574 if ($options["visible"] and $key != 0) {
575 $this->formatObject($tpl_tree, $options["child"], $options, $options['obj_id']);
576 }
577 if ($key == 0) {
578 $this->formatHeader($tpl_tree, $options["child"], $options);
579 }
580 }
581
582 $this->handleListEndTags($tpl_tree, $cur_depth, -1);
583
584 $tpl_tree->setVariable("TREE_LEAD", "");
585 if ($this->tree_lead !== "") {
586 $tpl_tree->setCurrentBlock("tree_lead");
587 $tpl_tree->setVariable("TREE_LEAD", $this->tree_lead);
588 $tpl_tree->parseCurrentBlock();
589 }
590 if ($this->getId() !== "") {
591 $tpl_tree->setVariable("TREE_ID", 'id="' . $this->getId() . '_tree"');
592 }
593
594 $html = $tpl_tree->get();
595
596 if ($this->getUseStandardFrame()) {
597 $mtpl = new ilGlobalTemplate("tpl.main.html", true, true);
598 $mtpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
599 $mtpl->setVariable("BODY_CLASS", "il_Explorer");
600 $mtpl->addBlockFile("CONTENT", "content", "tpl.explorer.html");
601 if ($this->getTitle() !== "") {
602 $mtpl->setVariable("TXT_EXPLORER_HEADER", $this->getTitle());
603 }
604 if ($this->getId() !== "") {
605 $mtpl->setVariable("ID", 'id="' . $this->getId() . '"');
606 }
607 $mtpl->setVariable("IMG_SPACE", ilUtil::getImagePath("spacer.png", false));
608 $mtpl->setCurrentBlock("content");
609 $mtpl->setVariable("EXPLORER", $html);
610 $mtpl->setVariable("EXP_REFRESH", $lng->txt("refresh"));
611 $mtpl->parseCurrentBlock();
612 $html = $mtpl->get();
613 }
614
615 return $html;
616 }
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="", string $a_css_location="")
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 $i, ILIAS\LTI\ToolProvider\$key, $lng, $tpl, ILIAS\Survey\Mode\getId(), ilUtil\getImagePath(), ilUtil\getStyleSheetLocation(), and ilYuiUtil\initConnection().

+ Here is the call graph for this function:

◆ getRoot()

ilExplorer::getRoot ( )

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

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

Referenced by ilECSNodeMappingCmsExplorer\formatHeader().

+ Here is the caller graph for this function:

◆ getTitle()

ilExplorer::getTitle ( )

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

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

References $title.

◆ getTitleLength()

ilExplorer::getTitleLength ( )

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

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

References $textwidth.

◆ getTreeLead()

ilExplorer::getTreeLead ( )

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

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

◆ getUseStandardFrame()

ilExplorer::getUseStandardFrame ( )

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

354 : bool
355 {
357 }
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 623 of file class.ilExplorer.php.

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

References $i, and 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 647 of file class.ilExplorer.php.

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

References ilTemplate\touchBlock().

+ Here is the call graph for this function:

◆ highlightNode()

ilExplorer::highlightNode ( string  $a_id)

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

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

◆ initItemCounter()

ilExplorer::initItemCounter ( int  $a_number)

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

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

◆ is_in_array()

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

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

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

References $i.

◆ isClickable()

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

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

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

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

◆ isVisible()

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

Reimplemented in ilSCORMExplorer, ilContainerSelectionExplorer, ilRepositoryExplorer, and ilPasteIntoMultipleItemsExplorer.

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

292 : bool {
294
295 if (!$this->rbac_check) {
296 return true;
297 }
298
299 $visible = $rbacsystem->checkAccess('visible', $a_ref_id);
300
301 return $visible;
302 }
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 488 of file class.ilExplorer.php.

491 : array {
492 return $a_objects;
493 }

◆ outputIcons()

ilExplorer::outputIcons ( bool  $a_icons)

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

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

Referenced by ilSCORMExplorer\__construct().

+ Here is the caller graph for this function:

◆ requestStr()

ilExplorer::requestStr ( string  $key)
protected

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

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

References ILIAS\LTI\ToolProvider\$key, and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ setAsynchExpanding()

ilExplorer::setAsynchExpanding ( bool  $a_val)

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

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

◆ setClickable()

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

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

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

◆ 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 1044 of file class.ilExplorer.php.

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

References ILIAS\LTI\ToolProvider\$key, 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 244 of file class.ilExplorer.php.

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

◆ setFiltered()

ilExplorer::setFiltered ( bool  $a_bool)

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

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

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 332 of file class.ilExplorer.php.

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

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 937 of file class.ilExplorer.php.

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

◆ setFrameUpdater()

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

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

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

◆ setId()

ilExplorer::setId ( string  $a_val)

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

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

Referenced by ilPasteIntoMultipleItemsExplorer\__construct().

+ Here is the caller graph for this function:

◆ setOrderColumn()

ilExplorer::setOrderColumn ( string  $a_column)

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

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

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 200 of file class.ilExplorer.php.

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

◆ 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 369 of file class.ilExplorer.php.

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

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

References $error, $ilErr, and ILIAS\LTI\ToolProvider\$key.

Referenced by ilECSNodeMappingLocalExplorer\formatObject().

+ Here is the caller graph for this function:

◆ setPostSort()

ilExplorer::setPostSort ( bool  $a_sort)

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

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

◆ setRoot()

ilExplorer::setRoot (   $a_root_id)

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

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

Referenced by ilECSNodeMappingLocalExplorer\__construct().

+ Here is the caller graph for this function:

◆ setSessionExpandVariable()

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

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

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

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 212 of file class.ilExplorer.php.

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

References $error, and $ilErr.

◆ setTitle()

ilExplorer::setTitle ( string  $a_val)

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

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

◆ setTitleLength()

ilExplorer::setTitleLength ( int  $a_length)

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

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

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 305 of file class.ilExplorer.php.

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

◆ 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 349 of file class.ilExplorer.php.

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

◆ 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 ilSolutionExplorer, and ilSearchRootSelector.

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

500 : bool
501 {
502 return true;
503 }

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 1106 of file class.ilExplorer.php.

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

References ILIAS\LTI\ToolProvider\$key, and ilArrayUtil\sortArray().

+ Here is the call graph for this function:

Field Documentation

◆ $a_up_script

string ilExplorer::$a_up_script = ""
protected

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

◆ $asnch_expanding

bool ilExplorer::$asnch_expanding = false
protected

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

Referenced by getAsynchExpanding().

◆ $counter

int ilExplorer::$counter = 0
protected

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

◆ $error

ilErrorHandling ilExplorer::$error
protected

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

Referenced by setParamsGet(), and setTargetGet().

◆ $expand_all

bool ilExplorer::$expand_all = false

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

◆ $expand_target

string ilExplorer::$expand_target = null

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

◆ $expand_variable

string ilExplorer::$expand_variable = ""

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

◆ $expanded

array ilExplorer::$expanded = []

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

◆ $filter

ilExplorer::$filter = []
protected

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

◆ $filter_mode

bool ilExplorer::$filter_mode

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

◆ $filtered

bool ilExplorer::$filtered = false

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

◆ $format_options

array ilExplorer::$format_options = []

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

◆ $frame_target

string ilExplorer::$frame_target = ""
protected

◆ $highlighted

string ilExplorer::$highlighted = ""
protected

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

◆ $iconList

array ilExplorer::$iconList = []
protected

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

◆ $id

string ilExplorer::$id = ""

◆ $is_clickable

array ilExplorer::$is_clickable = []

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

◆ $lng

◆ $obj_definition

ilObjectDefinition ilExplorer::$obj_definition
protected

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

Referenced by ilRepositoryExplorer\sortNodes().

◆ $order_column

string ilExplorer::$order_column = ""

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

◆ $order_direction

string ilExplorer::$order_direction = "asc"

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

◆ $output

string ilExplorer::$output = ""

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

◆ $output_icons

bool ilExplorer::$output_icons = false

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

◆ $params_get

string ilExplorer::$params_get = ""

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

◆ $post_sort

bool ilExplorer::$post_sort = false

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

◆ $rbac_check

bool ilExplorer::$rbac_check = false

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

◆ $rbacsystem

ilRbacSystem ilExplorer::$rbacsystem
protected

◆ $refinery

ILIAS Refinery Factory ilExplorer::$refinery
protected

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

Referenced by ilAsyncContainerSelectionExplorer\__construct().

◆ $root_id

ilExplorer::$root_id = null

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

◆ $show_minus

bool ilExplorer::$show_minus = true
protected

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

◆ $target

◆ $target_get

string ilExplorer::$target_get = ""

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

◆ $textwidth

int ilExplorer::$textwidth = 0
protected

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

Referenced by getTitleLength().

◆ $title

◆ $tpl

◆ $tree

◆ $tree_lead

string ilExplorer::$tree_lead = ""
protected

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

◆ $up_frame

string ilExplorer::$up_frame = ""
protected

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

◆ $up_params

string ilExplorer::$up_params = ""
protected

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

◆ $up_script

string ilExplorer::$up_script = ""
protected

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

◆ $use_standard_frame

bool ilExplorer::$use_standard_frame = false

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

◆ $wrapper

ILIAS HTTP Wrapper WrapperFactory ilExplorer::$wrapper
protected

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


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