ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilForumPostsTree Class Reference
+ Collaboration diagram for ilForumPostsTree:

Public Member Functions

 __construct ()
 
 setDepth (int $depth)
 
 getDepth ()
 
 setLft (int $lft)
 
 getLft ()
 
 setParentPos (int $parent_pos)
 
 getParentPos ()
 
 setPosFk (int $pos_fk)
 
 getPosFk ()
 
 setRgt (int $rgt)
 
 getRgt ()
 
 setSourceThreadId (int $source_thread_id)
 
 getSourceThreadId ()
 
 setTargetThreadId (int $target_thread_id)
 
 getTargetThreadId ()
 
 merge ()
 

Static Public Member Functions

static updateTargetRootRgt (int $root_node_id, int $rgt)
 

Private Attributes

readonly ilDBInterface $db
 
int $pos_fk = 0
 
int $parent_pos = 0
 
int $lft = 0
 
int $rgt = 0
 
int $depth = 0
 
int $source_thread_id = 0
 
int $target_thread_id = 0
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilForumPostsTree::__construct ( )

Definition at line 36 of file class.ilForumPostsTree.php.

37 {
38 global $DIC;
39 $this->db = $DIC->database();
40 }
global $DIC
Definition: shib_login.php:26

References $DIC.

Member Function Documentation

◆ getDepth()

ilForumPostsTree::getDepth ( )

Definition at line 47 of file class.ilForumPostsTree.php.

47 : int
48 {
49 return $this->depth;
50 }

References $depth.

Referenced by merge().

+ Here is the caller graph for this function:

◆ getLft()

ilForumPostsTree::getLft ( )

Definition at line 57 of file class.ilForumPostsTree.php.

57 : int
58 {
59 return $this->lft;
60 }

References $lft.

Referenced by merge().

+ Here is the caller graph for this function:

◆ getParentPos()

ilForumPostsTree::getParentPos ( )

Definition at line 67 of file class.ilForumPostsTree.php.

67 : int
68 {
69 return $this->parent_pos;
70 }

References $parent_pos.

Referenced by merge().

+ Here is the caller graph for this function:

◆ getPosFk()

ilForumPostsTree::getPosFk ( )

Definition at line 77 of file class.ilForumPostsTree.php.

77 : int
78 {
79 return $this->pos_fk;
80 }

References $pos_fk.

Referenced by merge().

+ Here is the caller graph for this function:

◆ getRgt()

ilForumPostsTree::getRgt ( )

Definition at line 87 of file class.ilForumPostsTree.php.

87 : int
88 {
89 return $this->rgt;
90 }

References $rgt.

Referenced by merge().

+ Here is the caller graph for this function:

◆ getSourceThreadId()

ilForumPostsTree::getSourceThreadId ( )

Definition at line 97 of file class.ilForumPostsTree.php.

97 : int
98 {
100 }

References $source_thread_id.

Referenced by merge().

+ Here is the caller graph for this function:

◆ getTargetThreadId()

ilForumPostsTree::getTargetThreadId ( )

Definition at line 107 of file class.ilForumPostsTree.php.

107 : int
108 {
110 }

References $target_thread_id.

Referenced by merge().

+ Here is the caller graph for this function:

◆ merge()

ilForumPostsTree::merge ( )

Definition at line 112 of file class.ilForumPostsTree.php.

112 : void
113 {
114 $this->db->update(
115 'frm_posts_tree',
116 [
117 'lft' => ['integer', $this->getLft()],
118 'rgt' => ['integer', $this->getRgt()],
119 'depth' => ['integer', $this->getDepth()],
120 'thr_fk' => ['integer', $this->getTargetThreadId()],
121 'parent_pos' => ['integer', $this->getParentPos()],
122 ],
123 [
124 'pos_fk' => ['integer', $this->getPosFk()],
125 'thr_fk' => ['integer', $this->getSourceThreadId()]
126 ]
127 );
128 }

References getDepth(), getLft(), getParentPos(), getPosFk(), getRgt(), getSourceThreadId(), and getTargetThreadId().

+ Here is the call graph for this function:

◆ setDepth()

ilForumPostsTree::setDepth ( int  $depth)

Definition at line 42 of file class.ilForumPostsTree.php.

42 : void
43 {
44 $this->depth = $depth;
45 }

References $depth.

◆ setLft()

ilForumPostsTree::setLft ( int  $lft)

Definition at line 52 of file class.ilForumPostsTree.php.

52 : void
53 {
54 $this->lft = $lft;
55 }

References $lft.

◆ setParentPos()

ilForumPostsTree::setParentPos ( int  $parent_pos)

Definition at line 62 of file class.ilForumPostsTree.php.

62 : void
63 {
64 $this->parent_pos = $parent_pos;
65 }

References $parent_pos.

◆ setPosFk()

ilForumPostsTree::setPosFk ( int  $pos_fk)

Definition at line 72 of file class.ilForumPostsTree.php.

72 : void
73 {
74 $this->pos_fk = $pos_fk;
75 }

References $pos_fk.

◆ setRgt()

ilForumPostsTree::setRgt ( int  $rgt)

Definition at line 82 of file class.ilForumPostsTree.php.

82 : void
83 {
84 $this->rgt = $rgt;
85 }

References $rgt.

◆ setSourceThreadId()

ilForumPostsTree::setSourceThreadId ( int  $source_thread_id)

Definition at line 92 of file class.ilForumPostsTree.php.

92 : void
93 {
94 $this->source_thread_id = $source_thread_id;
95 }

References $source_thread_id.

◆ setTargetThreadId()

ilForumPostsTree::setTargetThreadId ( int  $target_thread_id)

Definition at line 102 of file class.ilForumPostsTree.php.

102 : void
103 {
104 $this->target_thread_id = $target_thread_id;
105 }

References $target_thread_id.

◆ updateTargetRootRgt()

static ilForumPostsTree::updateTargetRootRgt ( int  $root_node_id,
int  $rgt 
)
static

Definition at line 130 of file class.ilForumPostsTree.php.

130 : void
131 {
132 global $DIC;
133
134 $ilDB = $DIC->database();
135
136 $ilDB->update(
137 'frm_posts_tree',
138 [
139 'rgt' => ['integer', $rgt]
140 ],
141 [
142 'parent_pos' => ['integer', 0],
143 'pos_fk' => ['integer', $root_node_id]
144 ]
145 );
146 }

References $DIC, $ilDB, and $rgt.

Referenced by ilForum\mergeThreads().

+ Here is the caller graph for this function:

Field Documentation

◆ $db

readonly ilDBInterface ilForumPostsTree::$db
private

Definition at line 27 of file class.ilForumPostsTree.php.

◆ $depth

int ilForumPostsTree::$depth = 0
private

Definition at line 32 of file class.ilForumPostsTree.php.

Referenced by getDepth(), and setDepth().

◆ $lft

int ilForumPostsTree::$lft = 0
private

Definition at line 30 of file class.ilForumPostsTree.php.

Referenced by getLft(), and setLft().

◆ $parent_pos

int ilForumPostsTree::$parent_pos = 0
private

Definition at line 29 of file class.ilForumPostsTree.php.

Referenced by getParentPos(), and setParentPos().

◆ $pos_fk

int ilForumPostsTree::$pos_fk = 0
private

Definition at line 28 of file class.ilForumPostsTree.php.

Referenced by getPosFk(), and setPosFk().

◆ $rgt

int ilForumPostsTree::$rgt = 0
private

Definition at line 31 of file class.ilForumPostsTree.php.

Referenced by getRgt(), setRgt(), and updateTargetRootRgt().

◆ $source_thread_id

int ilForumPostsTree::$source_thread_id = 0
private

Definition at line 33 of file class.ilForumPostsTree.php.

Referenced by getSourceThreadId(), and setSourceThreadId().

◆ $target_thread_id

int ilForumPostsTree::$target_thread_id = 0
private

Definition at line 34 of file class.ilForumPostsTree.php.

Referenced by getTargetThreadId(), and setTargetThreadId().


The documentation for this class was generated from the following file: