ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 ()
 
 mergeParentPos ()
 
 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.

References $DIC.

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

Member Function Documentation

◆ getDepth()

ilForumPostsTree::getDepth ( )

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

References $depth.

Referenced by merge(), and mergeParentPos().

28  {
29  return $this->depth;
30  }
+ Here is the caller graph for this function:

◆ getLft()

ilForumPostsTree::getLft ( )

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

References $lft.

Referenced by merge(), and mergeParentPos().

38  {
39  return $this->lft;
40  }
+ 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(), and mergeParentPos().

48  {
49  return $this->parent_pos;
50  }
+ 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(), and mergeParentPos().

58  {
59  return $this->pos_fk;
60  }
+ Here is the caller graph for this function:

◆ getRgt()

ilForumPostsTree::getRgt ( )

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

References $rgt.

Referenced by merge(), and mergeParentPos().

68  {
69  return $this->rgt;
70  }
+ 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(), and mergeParentPos().

88  {
90  }
+ 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(), and mergeParentPos().

98  {
100  }
+ Here is the caller graph for this function:

◆ getThrFk()

ilForumPostsTree::getThrFk ( )

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

References $thr_fk.

78  {
79  return $this->thr_fk;
80  }

◆ merge()

ilForumPostsTree::merge ( )

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

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

127  {
128  $this->db->update(
129  'frm_posts_tree',
130  array(
131  'lft' => array('integer', $this->getLft()),
132  'rgt' => array('integer', $this->getRgt()),
133  'depth' => array('integer', $this->getDepth()),
134  'thr_fk' => array('integer', $this->getTargetThreadId())
135  ),
136  array(
137  'pos_fk' => array('integer', $this->getPosFk()),
138  'parent_pos' => array('integer', $this->getParentPos()),
139  'thr_fk' => array('integer', $this->getSourceThreadId())
140  )
141  );
142  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ mergeParentPos()

ilForumPostsTree::mergeParentPos ( )

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

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

109  {
110  $this->db->update(
111  'frm_posts_tree',
112  array(
113  'parent_pos' => array('integer', $this->getParentPos()),
114  'lft' => array('integer', $this->getLft()),
115  'rgt' => array('integer', $this->getRgt()),
116  'depth' => array('integer', $this->getDepth()),
117  'thr_fk' => array('integer', $this->getTargetThreadId())
118  ),
119  array(
120  'pos_fk' => array('integer', $this->getPosFk()),
121  'parent_pos' => array('integer', 0),
122  'thr_fk' => array('integer', $this->getSourceThreadId())
123  )
124  );
125  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ setDepth()

ilForumPostsTree::setDepth (   $depth)

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

References $depth.

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

◆ setLft()

ilForumPostsTree::setLft (   $lft)

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

References $lft.

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

◆ setParentPos()

ilForumPostsTree::setParentPos (   $parent_pos)

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

References $parent_pos.

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

◆ setPosFk()

ilForumPostsTree::setPosFk (   $pos_fk)

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

References $pos_fk.

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

◆ setRgt()

ilForumPostsTree::setRgt (   $rgt)

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

References $rgt.

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

◆ setSourceThreadId()

ilForumPostsTree::setSourceThreadId (   $source_thread_id)

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

References $source_thread_id.

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

◆ setTargetThreadId()

ilForumPostsTree::setTargetThreadId (   $target_thread_id)

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

References $target_thread_id.

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

◆ setThrFk()

ilForumPostsTree::setThrFk (   $thr_fk)

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

References $thr_fk.

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

◆ updateTargetRootRgt()

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

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

References $DIC, $ilDB, $rgt, and array.

Referenced by ilForum\mergeThreads().

149  {
150  global $DIC;
151  $ilDB = $DIC->database();
152 
153  $ilDB->update(
154  'frm_posts_tree',
155  array(
156  'rgt' => array('integer', $rgt)),
157  array(
158  'parent_pos' => array('integer', 0),
159  'pos_fk' => array('integer', $root_node_id)
160  )
161  );
162  }
global $DIC
Definition: saml.php:7
Create styles array
The data for the language used.
global $ilDB
+ 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: