ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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
9{
13 protected $current_frm_ref_id = 0;
14
18 public function __construct(
19 $a_parent_obj,
20 $a_parent_cmd,
21 $a_selection_gui = null,
22 $a_selection_cmd = "selectObject",
23 $a_selection_par = "sel_ref_id"
24 ) {
25 parent::__construct($a_parent_obj, $a_parent_cmd, $a_selection_gui, $a_selection_cmd, $a_selection_par);
26 $this->setTypeWhiteList(array('root', 'cat', 'fold', 'crs', 'grp', 'frm'));
27 $this->setSelectMode('frm_ref_id');
28 }
29
33 public function getCurrentFrmRefId()
34 {
36 }
37
42 {
43 $this->current_frm_ref_id = $current_frm_ref_id;
44 }
45
49 public function isNodeClickable($a_node)
50 {
51 global $DIC;
52
53 if ($a_node['type'] == 'frm') {
54 if ($this->getCurrentFrmRefId() && $this->getCurrentFrmRefId() == $a_node['child']) {
55 return false;
56 }
57
58 return $DIC->access()->checkAccess('moderate_frm', '', $a_node['child']) && parent::isNodeClickable($a_node);
59 }
60
61 return false;
62 }
63
67 public function isNodeVisible($a_node)
68 {
69 return parent::isNodeVisible($a_node);
70 }
71
75 protected function isNodeSelectable($a_node)
76 {
77 global $DIC;
78
79 if ($a_node['type'] == 'frm') {
80 if ($this->getCurrentFrmRefId() && $this->getCurrentFrmRefId() == $a_node['child']) {
81 return false;
82 }
83
84 return $DIC->access()->checkAccess('moderate_frm', '', $a_node['child']) && parent::isNodeSelectable($a_node);
85 }
86
87 return false;
88 }
89}
An exception for terminatinating execution or to throw for unit testing.
setSelectMode($a_postvar, $a_multi=false)
Set select mode (to deactivate, pass an empty string as postvar)
isNodeVisible($a_node)
{Is node visible.bool visible true/false}
isNodeSelectable($a_node)
{Is node selectable?boolean node selectable true/false}
__construct( $a_parent_obj, $a_parent_cmd, $a_selection_gui=null, $a_selection_cmd="selectObject", $a_selection_par="sel_ref_id")
{}
isNodeClickable($a_node)
{Is node clickable?boolean node clickable true/false}
Explorer for selecting repository items.
setTypeWhiteList($a_val)
Set type white list.
global $DIC
Definition: saml.php:7