ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilForumMoveTopicsExplorer.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2015 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once 'Services/Repository/classes/class.ilRepositorySelectorExplorerGUI.php';
5 
11 {
15  protected $current_frm_ref_id = 0;
16 
20  public function __construct(
21  $a_parent_obj,
22  $a_parent_cmd,
23  $a_selection_gui = null,
24  $a_selection_cmd = "selectObject",
25  $a_selection_par = "sel_ref_id"
26  ) {
27  parent::__construct($a_parent_obj, $a_parent_cmd, $a_selection_gui, $a_selection_cmd, $a_selection_par);
28  $this->setTypeWhiteList(array('root', 'cat', 'fold', 'crs', 'grp', 'frm'));
29  $this->setSelectMode('frm_ref_id');
30  }
31 
35  public function getCurrentFrmRefId()
36  {
38  }
39 
44  {
45  $this->current_frm_ref_id = $current_frm_ref_id;
46  }
47 
51  public function isNodeClickable($a_node)
52  {
53  global $DIC;
54 
55  if ($a_node['type'] == 'frm') {
56  if ($this->getCurrentFrmRefId() && $this->getCurrentFrmRefId() == $a_node['child']) {
57  return false;
58  }
59 
60  return $DIC->access()->checkAccess('moderate_frm', '', $a_node['child']) && parent::isNodeClickable($a_node);
61  }
62 
63  return false;
64  }
65 
69  public function isNodeVisible($a_node)
70  {
71  return parent::isNodeVisible($a_node);
72  }
73 
77  protected function isNodeSelectable($a_node)
78  {
79  global $DIC;
80 
81  if ($a_node['type'] == 'frm') {
82  if ($this->getCurrentFrmRefId() && $this->getCurrentFrmRefId() == $a_node['child']) {
83  return false;
84  }
85 
86  return $DIC->access()->checkAccess('moderate_frm', '', $a_node['child']) && parent::isNodeSelectable($a_node);
87  }
88 
89  return false;
90  }
91 }
Explorer for selecting repository items.
global $DIC
Definition: saml.php:7
setSelectMode($a_postvar, $a_multi=false)
Set select mode (to deactivate, pass an empty string as postvar)
setTypeWhiteList($a_val)
Set type white list.
Create styles array
The data for the language used.
__construct( $a_parent_obj, $a_parent_cmd, $a_selection_gui=null, $a_selection_cmd="selectObject", $a_selection_par="sel_ref_id")
{}