ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
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
 

Detailed Description

Author
Nadia Ahmad nahma.nosp@m.d@da.nosp@m.tabay.nosp@m..de
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

ilForumPostsTree::__construct ( )

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

105  {
106 
107  }

Member Function Documentation

◆ getDepth()

ilForumPostsTree::getDepth ( )

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

References $depth.

Referenced by merge(), and mergeParentPos().

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

◆ getLft()

ilForumPostsTree::getLft ( )

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

References $lft.

Referenced by merge(), and mergeParentPos().

40  {
41  return $this->lft;
42  }
+ Here is the caller graph for this function:

◆ getParentPos()

ilForumPostsTree::getParentPos ( )

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

References $parent_pos.

Referenced by merge(), and mergeParentPos().

50  {
51  return $this->parent_pos;
52  }
+ Here is the caller graph for this function:

◆ getPosFk()

ilForumPostsTree::getPosFk ( )

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

References $pos_fk.

Referenced by merge(), and mergeParentPos().

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

◆ getRgt()

ilForumPostsTree::getRgt ( )

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

References $rgt.

Referenced by merge(), and mergeParentPos().

70  {
71  return $this->rgt;
72  }
+ Here is the caller graph for this function:

◆ getSourceThreadId()

ilForumPostsTree::getSourceThreadId ( )

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

References $source_thread_id.

Referenced by merge(), and mergeParentPos().

90  {
92  }
+ Here is the caller graph for this function:

◆ getTargetThreadId()

ilForumPostsTree::getTargetThreadId ( )

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

References $target_thread_id.

Referenced by merge(), and mergeParentPos().

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

◆ getThrFk()

ilForumPostsTree::getThrFk ( )

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

References $thr_fk.

80  {
81  return $this->thr_fk;
82  }

◆ merge()

ilForumPostsTree::merge ( )

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

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

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

◆ mergeParentPos()

ilForumPostsTree::mergeParentPos ( )

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

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

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

◆ setDepth()

ilForumPostsTree::setDepth (   $depth)

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

References $depth.

25  {
26  $this->depth = $depth;
27  }

◆ setLft()

ilForumPostsTree::setLft (   $lft)

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

References $lft.

35  {
36  $this->lft = $lft;
37  }

◆ setParentPos()

ilForumPostsTree::setParentPos (   $parent_pos)

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

References $parent_pos.

45  {
46  $this->parent_pos = $parent_pos;
47  }

◆ setPosFk()

ilForumPostsTree::setPosFk (   $pos_fk)

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

References $pos_fk.

55  {
56  $this->pos_fk = $pos_fk;
57  }

◆ setRgt()

ilForumPostsTree::setRgt (   $rgt)

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

References $rgt.

65  {
66  $this->rgt = $rgt;
67  }

◆ setSourceThreadId()

ilForumPostsTree::setSourceThreadId (   $source_thread_id)

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

References $source_thread_id.

85  {
86  $this->source_thread_id = $source_thread_id;
87  }

◆ setTargetThreadId()

ilForumPostsTree::setTargetThreadId (   $target_thread_id)

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

References $target_thread_id.

95  {
96  $this->target_thread_id = $target_thread_id;
97  }

◆ setThrFk()

ilForumPostsTree::setThrFk (   $thr_fk)

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

References $thr_fk.

75  {
76  $this->thr_fk = $thr_fk;
77  }

◆ updateTargetRootRgt()

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

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

References $ilDB, and $rgt.

Referenced by ilForum\mergeThreads().

149  {
150  global $ilDB;
151 
152  $ilDB->update('frm_posts_tree',
153  array(
154  'rgt' => array('integer', $rgt)),
155  array(
156  'parent_pos' => array('integer', 0),
157  'pos_fk' => array('integer', $root_node_id)
158  ));
159  }
global $ilDB
+ Here is the caller graph for this function:

Field Documentation

◆ $depth

ilForumPostsTree::$depth = 0
private

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

Referenced by getDepth(), and setDepth().

◆ $lft

ilForumPostsTree::$lft = 0
private

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

Referenced by getLft(), and setLft().

◆ $parent_pos

ilForumPostsTree::$parent_pos = 0
private

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

Referenced by getParentPos(), and setParentPos().

◆ $pos_fk

ilForumPostsTree::$pos_fk = 0
private

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

Referenced by getPosFk(), and setPosFk().

◆ $rgt

ilForumPostsTree::$rgt = 0
private

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

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

◆ $source_thread_id

ilForumPostsTree::$source_thread_id = 0
private

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

Referenced by getSourceThreadId(), and setSourceThreadId().

◆ $target_thread_id

ilForumPostsTree::$target_thread_id = 0
private

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

Referenced by getTargetThreadId(), and setTargetThreadId().

◆ $thr_fk

ilForumPostsTree::$thr_fk = 0
private

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

Referenced by getThrFk(), and setThrFk().


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