ILIAS  release_8 Revision v8.23
ilContainerSelectionExplorer Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilContainerSelectionExplorer:
+ Collaboration diagram for ilContainerSelectionExplorer:

Public Member Functions

 __construct (string $a_target)
 
 setTargetType (string $a_type)
 
 getTargetType ()
 
 isClickable (string $type, int $ref_id=0)
 
 isVisible ($a_ref_id, string $a_type)
 
 formatHeader (ilTemplate $tpl, $a_obj_id, array $a_option)
 
- Public Member Functions inherited from ilExplorer
 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...
 

Protected Attributes

ilAccessHandler $access
 
string $target_type
 
- Protected Attributes inherited from ilExplorer
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
 

Additional Inherited Members

- Data Fields inherited from ilExplorer
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 inherited from ilExplorer
 requestStr (string $key)
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

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

Definition at line 25 of file class.ilContainerSelectionExplorer.php.

Constructor & Destructor Documentation

◆ __construct()

ilContainerSelectionExplorer::__construct ( string  $a_target)

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

References $DIC, ilExplorer\$tree, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\access(), ilExplorer\addFilter(), ilExplorer\checkPermissions(), IL_FM_POSITIVE, ILIAS\Repository\lng(), ilTree\readRootId(), ilExplorer\setFiltered(), ilExplorer\setFilterMode(), ilExplorer\setSessionExpandVariable(), ilExplorer\setTitleLength(), and ilObject\TITLE_LENGTH.

32  {
33  global $DIC;
34 
35  $this->access = $DIC->access();
36  $this->lng = $DIC->language();
37  $tree = $DIC->repositoryTree();
38 
39  parent::__construct($a_target);
40 
41  $this->tree = $tree;
42  $this->root_id = $this->tree->readRootId();
43  $this->order_column = "title";
44 
45  $this->setSessionExpandVariable("ref_repexpand");
46 
47  $this->addFilter("root");
48  $this->addFilter("cat");
49  $this->addFilter("grp");
50  $this->addFilter("crs");
51 
53  $this->setFiltered(true);
55 
56  $this->checkPermissions(true);
57  }
setSessionExpandVariable(string $a_var_name="expand")
setFiltered(bool $a_bool)
const TITLE_LENGTH
const IL_FM_POSITIVE
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
setTitleLength(int $a_length)
checkPermissions(bool $a_check)
__construct(Container $dic, ilPlugin $plugin)
addFilter(string $a_item)
setFilterMode(int $a_mode=IL_FM_NEGATIVE)
+ Here is the call graph for this function:

Member Function Documentation

◆ formatHeader()

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

Definition at line 81 of file class.ilContainerSelectionExplorer.php.

References ilExplorer\$lng, ilTemplate\get(), ilTemplate\parseCurrentBlock(), ilTemplate\setCurrentBlock(), HTML_Template_IT\setVariable(), and ilLanguage\txt().

81  : void
82  {
83  $lng = $this->lng;
84 
85  $tpl = new ilTemplate("tpl.tree.html", true, true, "Services/UIComponent/Explorer");// TODO PHP8-REVIEW Why is this overwritten? Are you sure this is correct?
86 
87  $tpl->setCurrentBlock("text");
88  $tpl->setVariable("OBJ_TITLE", $lng->txt("repository"));
89  $tpl->parseCurrentBlock();
90 
91  $this->output .= $tpl->get();
92  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
get(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
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...
ilLanguage $lng
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:514
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
+ Here is the call graph for this function:

◆ getTargetType()

ilContainerSelectionExplorer::getTargetType ( )

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

References $target_type.

Referenced by isClickable().

64  : string
65  {
66  return $this->target_type;
67  }
+ Here is the caller graph for this function:

◆ isClickable()

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

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

References $ref_id, ILIAS\Repository\access(), and getTargetType().

69  : bool
70  {
71  return ($this->getTargetType() === $type && $this->access->checkAccess('visible', '', $ref_id));
72  }
$type
$ref_id
Definition: ltiauth.php:67
+ Here is the call graph for this function:

◆ isVisible()

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

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

References $access, and ilRBACAccessHandler\checkAccess().

74  : bool
75  {
76  $ilAccess = $this->access;
77 
78  return $ilAccess->checkAccess('visible', '', (int)$a_ref_id);
79  }
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance) ...
+ Here is the call graph for this function:

◆ setTargetType()

ilContainerSelectionExplorer::setTargetType ( string  $a_type)

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

59  : void
60  {
61  $this->target_type = $a_type;
62  }

Field Documentation

◆ $access

ilAccessHandler ilContainerSelectionExplorer::$access
protected

Definition at line 27 of file class.ilContainerSelectionExplorer.php.

Referenced by isVisible().

◆ $target_type

string ilContainerSelectionExplorer::$target_type
protected

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

Referenced by getTargetType().


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