4include_once(
"./Services/UIComponent/Explorer2/classes/class.ilTreeExplorerGUI.php");
 
   77        $a_selection_gui = 
null,
 
   78        $a_selection_cmd = 
"selectObject",
 
   79        $a_selection_par = 
"sel_ref_id",
 
   84        $this->tree = 
$DIC->repositoryTree();
 
   85        $this->obj_definition = 
$DIC[
"objDefinition"];
 
   86        $this->lng = 
$DIC->language();
 
   89        $objDefinition = 
$DIC[
"objDefinition"];
 
   91        $this->access = 
$DIC->access();
 
   92        $this->ctrl = 
$DIC->ctrl();
 
   94        if (is_null($a_selection_gui)) {
 
   95            $a_selection_gui = $a_parent_obj;
 
   98        $this->selection_gui = is_object($a_selection_gui)
 
   99            ? strtolower(get_class($a_selection_gui))
 
  100            : strtolower($a_selection_gui);
 
  101        $this->selection_cmd = $a_selection_cmd;
 
  102        $this->selection_par = $a_selection_par;
 
  111        foreach ($objDefinition->getSubObjectsRecursively(
"root") as $rtype) {
 
  112            if ($rtype[
"name"] != 
"itgr" && !$objDefinition->isSideBlock($rtype[
"name"])) {
 
  113                $white[] = $rtype[
"name"];
 
  119        $this->
setPathOpen((
int) $this->tree->readRootId());
 
  120        if ((
int) 
$_GET[
"ref_id"] > 0) {
 
  133        $this->nc_modifier = $a_val;
 
  157        if (is_callable(
$c)) {
 
  161        $title = $a_node[
"title"];
 
  163            if ($title == 
"ILIAS") {
 
  164                $title = 
$lng->txt(
"repository");
 
  194            $title = $a_node[
"title"];
 
  195            if ($title == 
"ILIAS") {
 
  196                $title = 
$lng->txt(
"repository");
 
  198            return $lng->txt(
"icon") . 
" " . $title;
 
  202        return parent::getNodeIconAlt($a_node);
 
  220        if ($a_node[
"child"] == 
$_GET[
"ref_id"] ||
 
  237        if ($this->select_postvar == 
"") {
 
  238            $ilCtrl->setParameterByClass($this->selection_gui, $this->selection_par, $a_node[
"child"]);
 
  239            $link = $ilCtrl->getLinkTargetByClass($this->selection_gui, $this->selection_cmd);
 
  240            $ilCtrl->setParameterByClass($this->selection_gui, $this->selection_par, 
"");
 
  258        if (!$ilAccess->checkAccess(
'visible', 
'', $a_node[
"child"])) {
 
  278        if ($parent_obj_id > 0) {
 
  281            $parent_type = 
"dummy";
 
  282            $this->type_grps[
"dummy"] = array(
"root" => 
"dummy");
 
  285        if (empty($this->type_grps[$parent_type])) {
 
  286            $this->type_grps[$parent_type] =
 
  287                $objDefinition->getGroupedRepositoryObjectTypes($parent_type);
 
  291        foreach ($a_childs as $child) {
 
  292            $g = $objDefinition->getGroupOfObj($child[
"type"]);
 
  296            $group[$g][] = $child;
 
  301        if (is_array($wl) && in_array(
"poll", $wl)) {
 
  302            $this->type_grps[$parent_type][
"poll"] = array();
 
  306        foreach ($this->type_grps[$parent_type] as $t => $g) {
 
  307            if (is_array($group[$t])) {
 
  309                include_once(
"./Services/Container/classes/class.ilContainer.php");
 
  310                include_once(
"./Services/Container/classes/class.ilContainerSorting.php");
 
  312                $group = $sort->sortItems($group);
 
  318                foreach ($group[$t] as $k => $item) {
 
  337        if (!$ilAccess->checkAccess(
"read", 
"", $a_parent_node_id)) {
 
  341        return parent::getChildsOfNode($a_parent_node_id);
 
  354        if ($this->select_postvar != 
"") {
 
  358        if (!$ilAccess->hasUserRBACorAnyPositionAccess(
"read", $a_node[
"child"])) {
 
  376        $this->highlighted_node = $a_value;
 
  397        if (!is_array($a_types)) {
 
  398            $a_types = array($a_types);
 
  400        $this->clickable_types = $a_types;
 
  444        if (!is_array($a_types)) {
 
  445            $a_types = array($a_types);
 
  447        $this->selectable_types = $a_types;
 
  457        return (array) $this->selectable_types;
 
An exception for terminatinating execution or to throw for unit testing.
static _getInstance($a_obj_id)
get instance by obj_id
setChildLimit($a_val)
Set child limit.
setSkipRootNode($a_val)
Set skip root node.
static _lookupObjId($a_id)
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
static _lookupType($a_id, $a_reference=false)
lookup object type
Explorer for selecting repository items.
setNodeContentModifier(callable $a_val)
Set node content modifier.
isNodeHighlighted($a_node)
Is node highlighted?
isNodeVisible($a_node)
Is node visible.
getNodeContentModifier()
Get node content modifier.
getNodeHref($a_node)
Get href for node.
getClickableTypes()
get whitelist for clickable items
setHighlightedNode($a_value)
set an alternate highlighted node if $_GET["ref_id"] is not set or wrong
sortChilds($a_childs, $a_parent_node_id)
Sort childs.
isNodeClickable($a_node)
Is node clickable?
setSelectableTypes($a_types)
Get HTML.
__construct( $a_parent_obj, $a_parent_cmd, $a_selection_gui=null, $a_selection_cmd="selectObject", $a_selection_par="sel_ref_id", $a_id="rep_exp_sel")
Constructor.
getHighlightedNode()
get an alternate highlighted node if $_GET["ref_id"] is not set or wrong Returns null if not set
getSelectableTypes()
get whitelist for clickable items
getNodeIcon($a_node)
Get node icon.
getChildsOfNode($a_parent_node_id)
Get childs of node.
getNodeContent($a_node)
Get node content.
getNodeIconAlt($a_node)
Get node icon alt text.
isNodeSelectable($a_node)
Is node selectable?
setClickableTypes($a_types)
set Whitelist for clickable items
Explorer class that works on tree objects (Services/Tree)
setTypeWhiteList($a_val)
Set type white list.
getRootNode()
Get root node.
setPathOpen($a_id)
Set node path to be opened.
getTypeWhiteList()
Get type white list.
getNodeId($a_node)
Get id for node.
setOrderField($a_val, $a_numeric=false)
Set order field.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc