ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilForumMoveTopicsExplorer.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
26{
27 protected int $current_frm_ref_id = 0;
28
29 public function __construct(ilObjForumGUI $a_parent_obj, string $a_parent_cmd)
30 {
31 parent::__construct($a_parent_obj, $a_parent_cmd);
32 $this->setTypeWhiteList(['root', 'cat', 'fold', 'crs', 'grp', 'frm']);
33 $this->setSelectMode('frm_ref_id');
34 }
35
36 public function getCurrentFrmRefId(): int
37 {
39 }
40
41 public function setCurrentFrmRefId(int $current_frm_ref_id): void
42 {
43 $this->current_frm_ref_id = $current_frm_ref_id;
44 }
45
46 public function isNodeClickable($a_node): bool
47 {
48 global $DIC;
49
50 if ($a_node['type'] === 'frm') {
51 if ($this->getCurrentFrmRefId() && $this->getCurrentFrmRefId() === $a_node['child']) {
52 return false;
53 }
54
55 return $DIC->access()->checkAccess(
56 'moderate_frm',
57 '',
58 (int) $a_node['child']
59 ) && parent::isNodeClickable($a_node);
60 }
61
62 return false;
63 }
64
65 protected function isNodeSelectable($a_node): bool
66 {
67 global $DIC;
68
69 if ($a_node['type'] === 'frm') {
70 if ($this->getCurrentFrmRefId() && $this->getCurrentFrmRefId() === $a_node['child']) {
71 return false;
72 }
73
74 return $DIC->access()->checkAccess(
75 'moderate_frm',
76 '',
77 (int) $a_node['child']
78 ) && parent::isNodeSelectable($a_node);
79 }
80
81 return false;
82 }
83}
setSelectMode(string $a_postvar, bool $a_multi=false)
Set select mode (to deactivate, pass an empty string as postvar)
setCurrentFrmRefId(int $current_frm_ref_id)
__construct(ilObjForumGUI $a_parent_obj, string $a_parent_cmd)
isNodeSelectable($a_node)
Is node selectable?
isNodeClickable($a_node)
Is node clickable?
@ilCtrl_Calls ilObjForumGUI: ilPermissionGUI, ilForumExportGUI, ilInfoScreenGUI @ilCtrl_Calls ilObjFo...
Explorer for selecting repository items.
setTypeWhiteList(array $a_val)
Set type white list.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26