ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilConditionSelector Class Reference

Repository Explorer. More...

+ Inheritance diagram for ilConditionSelector:
+ Collaboration diagram for ilConditionSelector:

Public Member Functions

 __construct ( $a_parent_obj, string $a_parent_cmd, $a_selection_gui=null, string $a_selection_cmd='addConditionTrigger', string $a_selection_par="source_id")
 
 isNodeVisible ($a_node)
 
 isNodeClickable ($a_node)
 
 setRefId (int $a_ref_id)
 
 getRefId ()
 
 isNodeHighlighted ($a_node)
 
- Public Member Functions inherited from ilRepositorySelectorExplorerGUI
 setNodeContentModifier (Closure $a_val)
 
 getNodeContentModifier ()
 
 getNodeContent ($a_node)
 
 getNodeIcon ($a_node)
 
 getNodeIconAlt ($a_node)
 
 isNodeHighlighted ($a_node)
 
 getNodeHref ($a_node)
 
 isNodeVisible ($a_node)
 
 sortChilds (array $a_childs, $a_parent_node_id)
 
 getChildsOfNode ($a_parent_node_id)
 
 setClickablePermission (string $rbac_perm)
 
 isNodeClickable ($a_node)
 
 setHighlightedNode (string $a_value)
 
 getHighlightedNode ()
 
 setClickableTypes (array $a_types)
 
 getClickableTypes ()
 
 setSelectableTypes (array $a_types)
 
 getSelectableTypes ()
 
- Public Member Functions inherited from ilTreeExplorerGUI
 __construct (string $a_expl_id, $a_parent_obj, string $a_parent_cmd, ilTree $a_tree, string $a_node_parameter_name="node_id")
 
 getTree ()
 
 setOrderField (string $a_val, bool $a_numeric=false)
 
 getOrderField ()
 
 setTypeWhiteList (array $a_val)
 Set type white list. More...
 
 getTypeWhiteList ()
 Get type white list. More...
 
 setTypeBlackList (array $a_val)
 Set type black list. More...
 
 getTypeBlackList ()
 Get type black list. More...
 
 setPreloadChilds (bool $a_val)
 
 getPreloadChilds ()
 
 getSuccessorNode ( $a_node_id, string $a_type="")
 Get successor node (currently only(!) based on lft/rgt tree values) More...
 
 getChildsOfNode ($a_parent_node_id)
 Get childs of node. More...
 
 getNodeId ($a_node)
 Get id for node. More...
 
 getNodeIconAlt ($a_node)
 Get node icon alt attribute. More...
 
 getRootNode ()
 Get root node. More...
 
 setRootId ($a_root)
 
 setPathOpen ($a_id)
 Set node path to be opened. More...
 
 getHTML ($new=false)
 Get HTML. More...
 
 getChildren ($record, $environment=null)
 Get a list of records (that list can also be empty). More...
 
 build (\ILIAS\UI\Component\Tree\Node\Factory $factory, $record, $environment=null)
 
 getTreeLabel ()
 
 getTreeComponent ()
 
 toggleExplorerNodeState ()
 Should be called by an ilCtrl-enabled command class if a tree node toggle action should be processed. More...
 
- Public Member Functions inherited from ilExplorerBaseGUI
 setChildLimit (int $a_val)
 
 getChildLimit ()
 
 setSearchTerm (string $a_val)
 
 getSearchTerm ()
 
 setMainTemplate (?ilGlobalTemplateInterface $a_main_tpl=null)
 
 getRootNode ()
 Get root node. More...
 
 getChildsOfNode ($a_parent_node_id)
 Get children of node. More...
 
 getNodeContent ($a_node)
 Get content of a node. More...
 
 getNodeId ($a_node)
 Get id of a node. More...
 
 getNodeHref ($a_node)
 Get href for node. More...
 
 nodeHasVisibleChilds ($a_node)
 Node has children Please note that this standard method may not be optimal depending on what a derived class does in isNodeVisible. More...
 
 sortChilds (array $a_childs, $a_parent_node_id)
 Sort childs. More...
 
 getNodeIcon ($a_node)
 Get node icon path. More...
 
 getNodeIconAlt ($a_node)
 Get node icon alt attribute. More...
 
 getNodeTarget ($a_node)
 Get node target (frame) attribute. More...
 
 getNodeOnClick ($a_node)
 Get node onclick attribute. More...
 
 isNodeVisible ($a_node)
 Is node visible? More...
 
 isNodeHighlighted ($a_node)
 Is node highlighted? More...
 
 isNodeClickable ($a_node)
 Is node clickable? More...
 
 getId ()
 Get id of explorer element. More...
 
 setSkipRootNode (bool $a_val)
 
 getSkipRootNode ()
 
 setAjax (bool $a_val)
 
 getAjax ()
 
 setSecondaryHighlightedNodes (array $a_val)
 Set secondary (background) highlighted nodes. More...
 
 getSecondaryHighlightedNodes ()
 Get secondary (background) highlighted nodes. More...
 
 setNodeOpen ($a_id)
 Set node to be opened (additional custom opened node, not standard expand behaviour) More...
 
 setSelectMode (string $a_postvar, bool $a_multi=false)
 Set select mode (to deactivate, pass an empty string as postvar) More...
 
 setNodeSelected ($a_id)
 Set node to be opened (additional custom opened node, not standard expand behaviour) More...
 
 setOfflineMode (bool $a_val)
 
 getOfflineMode ()
 
 handleCommand ()
 Handle explorer internal command. More...
 
 getContainerId ()
 
 openNode ()
 Open node. More...
 
 closeNode ()
 Close node. More...
 
 getNodeAsync ()
 Get node asynchronously. More...
 
 beforeRendering ()
 Before rendering. More...
 
 getOnLoadCode ()
 Get on load code. More...
 
 getHTML ()
 
 renderNode ($a_node, ilTemplate $tpl)
 Render node. More...
 
 renderChilds ($a_node_id, ilTemplate $tpl)
 Render childs. More...
 
 getDomNodeIdForNodeId ($a_node_id)
 Get DOM node id for node id. More...
 
 getNodeIdForDomNodeId (string $a_dom_node_id)
 Get node id for dom node id. More...
 
 listItemStart (ilTemplate $tpl, $a_node)
 List item start. More...
 
 listItemEnd (ilTemplate $tpl)
 
 listStart (ilTemplate $tpl)
 
 listEnd (ilTemplate $tpl)
 
 isNodeOnclickEnabled ()
 
 setNodeOnclickEnabled (bool $nodeOnclickEnabled)
 
 isEnableDnd ()
 
 setEnableDnd (bool $enable_dnd)
 
- Public Member Functions inherited from ILIAS\UI\Component\Tree\TreeRecursion
 build (Node\Factory $factory, $record, $environment=null)
 Build and return a Node. More...
 

Protected Attributes

int $highlighted_parent = null
 
int $ref_id = null
 
- Protected Attributes inherited from ilRepositorySelectorExplorerGUI
ilObjectDefinition $obj_definition
 
array $type_grps = []
 
array $session_materials = []
 
string $highlighted_node = ""
 
array $clickable_types = []
 
array $selectable_types = []
 
ilAccessHandler $access
 
Closure $nc_modifier = null
 
string $selection_gui = null
 
string $selection_par
 
string $selection_cmd
 
StandardGUIRequest $request
 
int $cur_ref_id
 
- Protected Attributes inherited from ilTreeExplorerGUI
ilLanguage $lng
 
Psr Http Message ServerRequestInterface $httpRequest
 
ilTree $tree = null
 
string $tree_label = ""
 
string $order_field = ""
 
bool $order_field_numeric = false
 
array $type_white_list = array()
 
array $type_black_list = array()
 
array $childs = array()
 
bool $preloaded = false
 
bool $preload_childs = false
 
array $root_node_data = null
 
array $all_childs = array()
 
 $root_id = 0
 
ILIAS DI UIServices $ui
 
- Protected Attributes inherited from ilExplorerBaseGUI
string $node_parameter_name
 
ilLogger $log
 
ilCtrl $ctrl
 
ilGlobalTemplateInterface $tpl
 
bool $skip_root_node = false
 
bool $ajax = false
 
array $custom_open_nodes = array()
 
array $selected_nodes = array()
 
string $select_postvar = ""
 
bool $offline_mode = false
 
array $sec_highl_nodes = array()
 
bool $enable_dnd = false
 
string $search_term = ""
 
array $open_nodes = []
 
ilSessionIStorage $store
 
bool $select_multi = false
 
 $parent_obj
 
int $child_limit = 0
 
string $parent_cmd = ''
 
string $requested_exp_cmd = ""
 
string $requested_exp_cont = ""
 
string $requested_searchterm = ""
 
string $requested_node_id = ""
 
string $id
 

Additional Inherited Members

- Static Public Member Functions inherited from ilExplorerBaseGUI
static getLocalExplorerJsPath ()
 
static getLocalJsTreeJsPath ()
 
static getLocalJsTreeCssPath ()
 
static createHTMLExportDirs (string $a_target_dir)
 
static init (?ilGlobalTemplateInterface $a_main_tpl=null)
 
- Protected Member Functions inherited from ilRepositorySelectorExplorerGUI
 isNodeSelectable ($a_node)
 
- Protected Member Functions inherited from ilTreeExplorerGUI
 preloadChilds ()
 
 matches ($node)
 Does a node match a search term (or is search term empty) More...
 
 getRootId ()
 
 createNode (\ILIAS\UI\Component\Tree\Node\Factory $factory, $record)
 Creates at tree node, can be overwritten in derivatives if another node type should be used. More...
 
 getNodeStateToggleCmdClasses ($record)
 Should return an array of ilCtrl-enabled command classes which should be used to build the URL for the expand/collapse actions applied on a tree node. More...
 
 render ()
 
- Protected Member Functions inherited from ilExplorerBaseGUI
 isNodeSelectable ($a_node)
 Is node selectable? More...
 
 getNodeToggleOnClick ($a_node)
 Get onclick attribute for node toggling. More...
 
 getSelectOnClick ($a_node)
 Get onclick attribute for selecting radio/checkbox. More...
 
 isNodeOpen ($node_id)
 Get all open nodes. More...
 
 getJSTreePlugins ()
 
 isNodeRequested (string $a_node_id)
 
- Static Protected Attributes inherited from ilExplorerBaseGUI
static string $js_tree_path = "./node_modules/jstree/dist/jstree.js"
 
static string $js_tree_path_css = "./node_modules/jstree/dist/themes/default/style.min.css"
 
static string $js_expl_path = "assets/js/Explorer2.js"
 

Detailed Description

Repository Explorer.

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

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

Constructor & Destructor Documentation

◆ __construct()

ilConditionSelector::__construct (   $a_parent_obj,
string  $a_parent_cmd,
  $a_selection_gui = null,
string  $a_selection_cmd = 'addConditionTrigger',
string  $a_selection_par = "source_id" 
)

Definition at line 33 of file class.ilConditionSelector.php.

References ILIAS\GlobalScreen\Provider\__construct(), and ilExplorerBaseGUI\setAjax().

39  {
41  $a_parent_obj,
42  $a_parent_cmd,
43  $a_selection_gui,
44  $a_selection_cmd,
45  $a_selection_par
46  );
47 
48  $this->setAjax(true);
49  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ getRefId()

ilConditionSelector::getRefId ( )

Definition at line 100 of file class.ilConditionSelector.php.

References $ref_id.

Referenced by isNodeClickable(), and isNodeVisible().

100  : ?int
101  {
102  return $this->ref_id;
103  }
+ Here is the caller graph for this function:

◆ isNodeClickable()

ilConditionSelector::isNodeClickable (   $a_node)

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

References getRefId().

75  : bool
76  {
77  if (!parent::isNodeClickable($a_node)) {
78  return false;
79  }
80 
81  if ($a_node["child"] == $this->getRefId()) {
82  return false;
83  }
84 
85  return true;
86  }
+ Here is the call graph for this function:

◆ isNodeHighlighted()

ilConditionSelector::isNodeHighlighted (   $a_node)

Definition at line 108 of file class.ilConditionSelector.php.

108  : bool
109  {
110  //highlight parent if target object cant be highlighted
111  if ($this->highlighted_parent == $a_node["child"]) {
112  return true;
113  }
114 
115  return parent::isNodeHighlighted($a_node);
116  }

◆ isNodeVisible()

ilConditionSelector::isNodeVisible (   $a_node)

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

References $DIC, ilTreeExplorerGUI\$tree, ilTree\getParentId(), and getRefId().

54  : bool
55  {
56  global $DIC;
57 
58  $ilAccess = $DIC['ilAccess'];
59  $tree = $DIC['tree'];
60 
61  if (!$ilAccess->checkAccess('read', '', (int) $a_node["child"])) {
62  return false;
63  }
64  //remove childs of target object
65  if ($tree->getParentId((int) $a_node["child"]) === $this->getRefId()) {
66  return false;
67  }
68 
69  return true;
70  }
global $DIC
Definition: shib_login.php:22
getParentId(int $a_node_id)
get parent id of given node
+ Here is the call graph for this function:

◆ setRefId()

ilConditionSelector::setRefId ( int  $a_ref_id)

Definition at line 88 of file class.ilConditionSelector.php.

References ilObject\_lookupType(), and ilTreeExplorerGUI\getTypeWhiteList().

88  : void
89  {
90  $this->ref_id = $a_ref_id;
91 
92  //can target object be highlighted?
93  $target_type = ilObject::_lookupType($a_ref_id, true);
94 
95  if (!in_array($target_type, $this->getTypeWhiteList(), true)) {
96  $this->highlighted_parent = $this->tree->getParentId($a_ref_id);
97  }
98  }
static _lookupType(int $id, bool $reference=false)
getTypeWhiteList()
Get type white list.
+ Here is the call graph for this function:

Field Documentation

◆ $highlighted_parent

int ilConditionSelector::$highlighted_parent = null
protected

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

◆ $ref_id

int ilConditionSelector::$ref_id = null
protected

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

Referenced by getRefId().


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