ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilPoolSelectorGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
13include_once "./Services/Repository/classes/class.ilRepositorySelectorExplorerGUI.php";
14
16{
17 protected $clickable_types = array();
18 protected $selection_subcmd = "";
19
20
30 public function __construct(
31 $a_parent_obj,
32 $a_parent_cmd,
33 $a_selection_gui = null,
34 $a_selection_cmd = "insert",
35 $a_selection_subcmd = "selectPool",
36 $a_selection_par = "pool_ref_id"
37 ) {
38 global $DIC;
39
40 $this->ctrl = $DIC->ctrl();
41 if ($a_selection_gui == null) {
42 $a_selection_gui = $a_parent_obj;
43 }
44
45 $this->selection_subcmd = $a_selection_subcmd;
46 parent::__construct(
47 $a_parent_obj,
48 $a_parent_cmd,
49 $a_selection_gui,
50 $a_selection_cmd,
51 $a_selection_par
52 );
53
54 $this->setAjax(true);
55 }
56
63 public function getNodeHref($a_node)
64 {
66
67 $ilCtrl->setParameterByClass($this->selection_gui, "subCmd", $this->selection_subcmd);
68 $link = parent::getNodeHref($a_node);
69 $ilCtrl->setParameterByClass($this->selection_gui, "subCmd", "");
70 return $link;
71 }
72
79 public function isNodeVisible($a_node)
80 {
81 if (parent::isNodeVisible($a_node)) {
82 //hide empty container
83 if (count($this->getChildsOfNode($a_node["child"])) > 0 || $this->isNodeClickable($a_node)) {
84 // #16523
85 if ($a_node["type"] == "qpl") {
86 include_once "Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
87 return ilObjQuestionPool::_lookupOnline($a_node["obj_id"]);
88 }
89
90 return true;
91 }
92 }
93
94 return false;
95 }
96}
An exception for terminatinating execution or to throw for unit testing.
static _lookupOnline($a_obj_id, $is_reference=false)
Select media pool for adding objects into pages.
__construct( $a_parent_obj, $a_parent_cmd, $a_selection_gui=null, $a_selection_cmd="insert", $a_selection_subcmd="selectPool", $a_selection_par="pool_ref_id")
Constructor.
isNodeVisible($a_node)
Is node visible.
getNodeHref($a_node)
Get href for node.
Explorer for selecting repository items.
getChildsOfNode($a_parent_node_id)
Get childs of node.
global $ilCtrl
Definition: ilias.php:18
global $DIC
Definition: saml.php:7