ILIAS  release_7 Revision v7.30-3-g800a261c036
ilForumPostsTree Class Reference
+ Collaboration diagram for ilForumPostsTree:

Public Member Functions

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

Static Public Member Functions

static updateTargetRootRgt ($root_node_id, $rgt)
 

Private Attributes

 $thr_fk = 0
 
 $pos_fk = 0
 
 $parent_pos = 0
 
 $lft = 0
 
 $rgt = 0
 
 $depth = 0
 
 $source_thread_id = 0
 
 $target_thread_id = 0
 
 $db
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilForumPostsTree::__construct ( )

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

103 {
104 global $DIC;
105 $this->db = $DIC->database();
106 }
global $DIC
Definition: goto.php:24

References $DIC.

Member Function Documentation

◆ getDepth()

ilForumPostsTree::getDepth ( )

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

References $depth.

Referenced by merge().

+ Here is the caller graph for this function:

◆ getLft()

ilForumPostsTree::getLft ( )

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

38 {
39 return $this->lft;
40 }

References $lft.

Referenced by merge().

+ Here is the caller graph for this function:

◆ getParentPos()

ilForumPostsTree::getParentPos ( )

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

References $parent_pos.

Referenced by merge().

+ Here is the caller graph for this function:

◆ getPosFk()

ilForumPostsTree::getPosFk ( )

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

References $pos_fk.

Referenced by merge().

+ Here is the caller graph for this function:

◆ getRgt()

ilForumPostsTree::getRgt ( )

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

68 {
69 return $this->rgt;
70 }

References $rgt.

Referenced by merge().

+ Here is the caller graph for this function:

◆ getSourceThreadId()

ilForumPostsTree::getSourceThreadId ( )

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

References $source_thread_id.

Referenced by merge().

+ Here is the caller graph for this function:

◆ getTargetThreadId()

ilForumPostsTree::getTargetThreadId ( )

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

References $target_thread_id.

Referenced by merge().

+ Here is the caller graph for this function:

◆ getThrFk()

ilForumPostsTree::getThrFk ( )

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

References $thr_fk.

◆ merge()

ilForumPostsTree::merge ( )

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

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 }

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

+ Here is the call graph for this function:

◆ setDepth()

ilForumPostsTree::setDepth (   $depth)

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

23 {
24 $this->depth = $depth;
25 }

References $depth.

◆ setLft()

ilForumPostsTree::setLft (   $lft)

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

33 {
34 $this->lft = $lft;
35 }

References $lft.

◆ setParentPos()

ilForumPostsTree::setParentPos (   $parent_pos)

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

43 {
44 $this->parent_pos = $parent_pos;
45 }

References $parent_pos.

◆ setPosFk()

ilForumPostsTree::setPosFk (   $pos_fk)

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

53 {
54 $this->pos_fk = $pos_fk;
55 }

References $pos_fk.

◆ setRgt()

ilForumPostsTree::setRgt (   $rgt)

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

63 {
64 $this->rgt = $rgt;
65 }

References $rgt.

◆ setSourceThreadId()

ilForumPostsTree::setSourceThreadId (   $source_thread_id)

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

83 {
84 $this->source_thread_id = $source_thread_id;
85 }

References $source_thread_id.

◆ setTargetThreadId()

ilForumPostsTree::setTargetThreadId (   $target_thread_id)

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

93 {
94 $this->target_thread_id = $target_thread_id;
95 }

References $target_thread_id.

◆ setThrFk()

ilForumPostsTree::setThrFk (   $thr_fk)

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

73 {
74 $this->thr_fk = $thr_fk;
75 }

References $thr_fk.

◆ updateTargetRootRgt()

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

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

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 }
global $ilDB

References $DIC, $ilDB, and $rgt.

Referenced by ilForum\mergeThreads().

+ Here is the caller graph for this function:

Field Documentation

◆ $db

ilForumPostsTree::$db
private

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

◆ $depth

ilForumPostsTree::$depth = 0
private

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

Referenced by getDepth(), and setDepth().

◆ $lft

ilForumPostsTree::$lft = 0
private

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

Referenced by getLft(), and setLft().

◆ $parent_pos

ilForumPostsTree::$parent_pos = 0
private

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

Referenced by getParentPos(), and setParentPos().

◆ $pos_fk

ilForumPostsTree::$pos_fk = 0
private

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

Referenced by getPosFk(), and setPosFk().

◆ $rgt

ilForumPostsTree::$rgt = 0
private

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

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

◆ $source_thread_id

ilForumPostsTree::$source_thread_id = 0
private

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

Referenced by getSourceThreadId(), and setSourceThreadId().

◆ $target_thread_id

ilForumPostsTree::$target_thread_id = 0
private

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

Referenced by getTargetThreadId(), and setTargetThreadId().

◆ $thr_fk

ilForumPostsTree::$thr_fk = 0
private

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

Referenced by getThrFk(), and setThrFk().


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