ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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.

References $DIC.

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

Member Function Documentation

◆ getDepth()

ilForumPostsTree::getDepth ( )

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

References $depth.

Referenced by merge().

47  : int
48  {
49  return $this->depth;
50  }
+ Here is the caller graph for this function:

◆ getLft()

ilForumPostsTree::getLft ( )

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

References $lft.

Referenced by merge().

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

◆ getParentPos()

ilForumPostsTree::getParentPos ( )

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

References $parent_pos.

Referenced by merge().

67  : int
68  {
69  return $this->parent_pos;
70  }
+ Here is the caller graph for this function:

◆ getPosFk()

ilForumPostsTree::getPosFk ( )

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

References $pos_fk.

Referenced by merge().

77  : int
78  {
79  return $this->pos_fk;
80  }
+ Here is the caller graph for this function:

◆ getRgt()

ilForumPostsTree::getRgt ( )

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

References $rgt.

Referenced by merge().

87  : int
88  {
89  return $this->rgt;
90  }
+ Here is the caller graph for this function:

◆ getSourceThreadId()

ilForumPostsTree::getSourceThreadId ( )

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

References $source_thread_id.

Referenced by merge().

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

◆ getTargetThreadId()

ilForumPostsTree::getTargetThreadId ( )

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

References $target_thread_id.

Referenced by merge().

107  : int
108  {
110  }
+ Here is the caller graph for this function:

◆ merge()

ilForumPostsTree::merge ( )

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

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

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  }
+ Here is the call graph for this function:

◆ setDepth()

ilForumPostsTree::setDepth ( int  $depth)

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

References $depth.

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

◆ setLft()

ilForumPostsTree::setLft ( int  $lft)

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

References $lft.

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

◆ setParentPos()

ilForumPostsTree::setParentPos ( int  $parent_pos)

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

References $parent_pos.

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

◆ setPosFk()

ilForumPostsTree::setPosFk ( int  $pos_fk)

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

References $pos_fk.

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

◆ setRgt()

ilForumPostsTree::setRgt ( int  $rgt)

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

References $rgt.

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

◆ setSourceThreadId()

ilForumPostsTree::setSourceThreadId ( int  $source_thread_id)

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

References $source_thread_id.

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

◆ setTargetThreadId()

ilForumPostsTree::setTargetThreadId ( int  $target_thread_id)

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

References $target_thread_id.

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

◆ updateTargetRootRgt()

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

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

References $DIC, and $ilDB.

Referenced by ilForum\mergeThreads().

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  }
global $DIC
Definition: shib_login.php:22
+ 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(), and setRgt().

◆ $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: