ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilStandardGlossarySelectorGUI.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
25 {
26  public function __construct(
27  ilObjGlossaryGUI $a_parent_obj,
28  string $a_parent_cmd,
29  ?ilObjGlossaryGUI $a_selection_gui = null,
30  string $a_selection_cmd = "selectObject",
31  string $a_selection_par = "sel_ref_id",
32  ) {
33  parent::__construct($a_parent_obj, $a_parent_cmd, $a_selection_gui, $a_selection_cmd, $a_selection_par);
34  $this->setTypeWhiteList(["root", "cat", "grp", "crs", "glo", "fold"]);
35  $this->setClickableTypes(["glo"]);
36  }
37 
38  public function isNodeVisible($a_node): bool
39  {
40  if ($a_node['type'] === "glo") {
41  $glossary = new ilObjGlossary($a_node["child"]);
42  if ($glossary->isVirtual()) {
43  return false;
44  } else {
45  return parent::isNodeVisible($a_node);
46  }
47  }
48 
49  return parent::isNodeVisible($a_node);
50  }
51 }
GUI class for ilGlossary.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setTypeWhiteList(array $a_val)
Set type white list.
__construct(ilObjGlossaryGUI $a_parent_obj, string $a_parent_cmd, ?ilObjGlossaryGUI $a_selection_gui=null, string $a_selection_cmd="selectObject", string $a_selection_par="sel_ref_id",)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__construct(Container $dic, ilPlugin $plugin)