ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilForumPostsTree.php
Go to the documentation of this file.
1
<?
php
2
/* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
3
8
class
ilForumPostsTree
9
{
10
private
$thr_fk
= 0;
11
private
$pos_fk
= 0;
12
private
$parent_pos
= 0;
13
private
$lft
= 0;
14
private
$rgt
= 0;
15
private
$depth
= 0;
16
17
private
$source_thread_id
= 0;
18
private
$target_thread_id
= 0;
19
20
private
$db
;
21
22
public
function
setDepth
(
$depth
)
23
{
24
$this->depth =
$depth
;
25
}
26
27
public
function
getDepth
()
28
{
29
return
$this->depth
;
30
}
31
32
public
function
setLft
(
$lft
)
33
{
34
$this->lft =
$lft
;
35
}
36
37
public
function
getLft
()
38
{
39
return
$this->lft
;
40
}
41
42
public
function
setParentPos
(
$parent_pos
)
43
{
44
$this->parent_pos =
$parent_pos
;
45
}
46
47
public
function
getParentPos
()
48
{
49
return
$this->parent_pos
;
50
}
51
52
public
function
setPosFk
(
$pos_fk
)
53
{
54
$this->pos_fk =
$pos_fk
;
55
}
56
57
public
function
getPosFk
()
58
{
59
return
$this->pos_fk
;
60
}
61
62
public
function
setRgt
(
$rgt
)
63
{
64
$this->rgt =
$rgt
;
65
}
66
67
public
function
getRgt
()
68
{
69
return
$this->rgt
;
70
}
71
72
public
function
setThrFk
(
$thr_fk
)
73
{
74
$this->thr_fk =
$thr_fk
;
75
}
76
77
public
function
getThrFk
()
78
{
79
return
$this->thr_fk
;
80
}
81
82
public
function
setSourceThreadId
(
$source_thread_id
)
83
{
84
$this->source_thread_id =
$source_thread_id
;
85
}
86
87
public
function
getSourceThreadId
()
88
{
89
return
$this->source_thread_id
;
90
}
91
92
public
function
setTargetThreadId
(
$target_thread_id
)
93
{
94
$this->target_thread_id =
$target_thread_id
;
95
}
96
97
public
function
getTargetThreadId
()
98
{
99
return
$this->target_thread_id
;
100
}
101
102
public
function
__construct
()
103
{
104
global
$DIC
;
105
$this->db = $DIC->database();
106
}
107
108
public
function
merge
()
109
{
110
$this->db->update(
111
'frm_posts_tree'
,
112
[
113
'lft'
=> array(
'integer'
, $this->
getLft
()),
114
'rgt'
=> array(
'integer'
, $this->
getRgt
()),
115
'depth'
=> array(
'integer'
, $this->
getDepth
()),
116
'thr_fk'
=> array(
'integer'
, $this->
getTargetThreadId
()),
117
'parent_pos'
=> array(
'integer'
, $this->
getParentPos
()),
118
],
119
[
120
'pos_fk'
=> array(
'integer'
, $this->
getPosFk
()),
121
'thr_fk'
=> array(
'integer'
, $this->
getSourceThreadId
())
122
]
123
);
124
}
125
126
/***
127
* @param integer $root_node_id
128
* @param integer $rgt
129
*/
130
public
static
function
updateTargetRootRgt
($root_node_id,
$rgt
)
131
{
132
global
$DIC
;
133
$ilDB
= $DIC->database();
134
135
$ilDB
->update(
136
'frm_posts_tree'
,
137
array(
138
'rgt'
=> array(
'integer'
,
$rgt
)),
139
array(
140
'parent_pos'
=> array(
'integer'
, 0),
141
'pos_fk'
=> array(
'integer'
, $root_node_id)
142
)
143
);
144
}
145
}
ilForumPostsTree\getThrFk
getThrFk()
Definition:
class.ilForumPostsTree.php:77
ilForumPostsTree\getDepth
getDepth()
Definition:
class.ilForumPostsTree.php:27
ilForumPostsTree\setLft
setLft($lft)
Definition:
class.ilForumPostsTree.php:32
ilForumPostsTree\setDepth
setDepth($depth)
Definition:
class.ilForumPostsTree.php:22
ilForumPostsTree\$db
$db
Definition:
class.ilForumPostsTree.php:20
ilForumPostsTree\getRgt
getRgt()
Definition:
class.ilForumPostsTree.php:67
$DIC
global $DIC
Definition:
saml.php:7
ilForumPostsTree\$rgt
$rgt
Definition:
class.ilForumPostsTree.php:14
ilForumPostsTree\$source_thread_id
$source_thread_id
Definition:
class.ilForumPostsTree.php:17
ilForumPostsTree\updateTargetRootRgt
static updateTargetRootRgt($root_node_id, $rgt)
Definition:
class.ilForumPostsTree.php:130
ilForumPostsTree\$target_thread_id
$target_thread_id
Definition:
class.ilForumPostsTree.php:18
ilForumPostsTree\getPosFk
getPosFk()
Definition:
class.ilForumPostsTree.php:57
ilForumPostsTree\getSourceThreadId
getSourceThreadId()
Definition:
class.ilForumPostsTree.php:87
ilForumPostsTree\$lft
$lft
Definition:
class.ilForumPostsTree.php:13
ilForumPostsTree\getLft
getLft()
Definition:
class.ilForumPostsTree.php:37
ilForumPostsTree\setRgt
setRgt($rgt)
Definition:
class.ilForumPostsTree.php:62
ilForumPostsTree\setPosFk
setPosFk($pos_fk)
Definition:
class.ilForumPostsTree.php:52
ilForumPostsTree\$thr_fk
$thr_fk
Definition:
class.ilForumPostsTree.php:10
ilForumPostsTree\getTargetThreadId
getTargetThreadId()
Definition:
class.ilForumPostsTree.php:97
ilForumPostsTree\getParentPos
getParentPos()
Definition:
class.ilForumPostsTree.php:47
ilForumPostsTree\setTargetThreadId
setTargetThreadId($target_thread_id)
Definition:
class.ilForumPostsTree.php:92
ilForumPostsTree\setParentPos
setParentPos($parent_pos)
Definition:
class.ilForumPostsTree.php:42
ilForumPostsTree\$depth
$depth
Definition:
class.ilForumPostsTree.php:15
ilForumPostsTree\setThrFk
setThrFk($thr_fk)
Definition:
class.ilForumPostsTree.php:72
ilForumPostsTree\__construct
__construct()
Definition:
class.ilForumPostsTree.php:102
ilForumPostsTree\$pos_fk
$pos_fk
Definition:
class.ilForumPostsTree.php:11
ilForumPostsTree\setSourceThreadId
setSourceThreadId($source_thread_id)
Definition:
class.ilForumPostsTree.php:82
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
ilForumPostsTree\merge
merge()
Definition:
class.ilForumPostsTree.php:108
php
ilForumPostsTree
Definition:
class.ilForumPostsTree.php:8
ilForumPostsTree\$parent_pos
$parent_pos
Definition:
class.ilForumPostsTree.php:12
Modules
Forum
classes
class.ilForumPostsTree.php
Generated on Thu Jan 30 2025 19:01:40 for ILIAS by
1.8.13 (using
Doxyfile
)