ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilForumPostsDeleted Class Reference

Class ilForumPostsDeleted. More...

+ Collaboration diagram for ilForumPostsDeleted:

Public Member Functions

 __construct (ilObjForumNotificationDataProvider $provider=null)
 
 insert ()
 
 deleteNotifiedEntries ()
 
 getDeletedId ()
 
 setDeletedId ($deleted_id)
 
 getDeletedDate ()
 
 setDeletedDate ($deleted_date)
 
 getDeletedBy ()
 
 setDeletedBy ($deleted_by)
 
 getForumTitle ()
 
 setForumTitle ($forum_title)
 
 getThreadTitle ()
 
 setThreadTitle ($thread_title)
 
 getPostTitle ()
 
 setPostTitle ($post_title)
 
 getPostMessage ()
 
 setPostMessage ($post_message)
 
 getPostDate ()
 
 setPostDate ($post_date)
 
 getObjId ()
 
 setObjId ($obj_id)
 
 getRefId ()
 
 setRefId ($ref_id)
 
 getThreadId ()
 
 setThreadId ($thread_id)
 
 getForumId ()
 
 setForumId ($forum_id)
 
 getPosDisplayUserId ()
 
 setPosDisplayUserId ($pos_display_user_id)
 
 getPosUserAlias ()
 
 setPosUserAlias ($pos_usr_alias)
 
 isThreadDeleted ()
 
 setThreadDeleted ($thread_deleted)
 

Protected Attributes

 $deleted_id = 0
 
 $deleted_date = null
 
 $deleted_by = ''
 
 $forum_title = ''
 
 $thread_title = ''
 
 $post_title = ''
 
 $post_message = ''
 
 $post_date = ''
 
 $obj_id = 0
 
 $ref_id = 0
 
 $thread_id = 0
 
 $forum_id = 0
 
 $pos_display_user_id = 0
 
 $pos_usr_alias = ''
 
 $thread_deleted = false
 

Private Attributes

 $user
 
 $db
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilForumPostsDeleted::__construct ( ilObjForumNotificationDataProvider  $provider = null)
Parameters
ilObjForumNotificationDataProvider | NULL$provider

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

References $DIC, setDeletedBy(), setDeletedDate(), setForumId(), setForumTitle(), setObjId(), setPosDisplayUserId(), setPostDate(), setPostMessage(), setPostTitle(), setPosUserAlias(), setRefId(), setThreadId(), setThreadTitle(), and user().

85  {
86  global $DIC;
87  $this->user = $DIC->user();
88  $this->db = $DIC->database();
89 
90  if (is_object($provider)) {
91  if ($provider->objPost->getUserAlias() && $provider->objPost->getDisplayUserId() == 0
92  && $provider->objPost->getPosAuthorId() == $DIC->user()->getId()) {
93  $this->setDeletedBy($provider->objPost->getUserAlias());
94  } else {
95  $this->setDeletedBy($this->user->getLogin());
96  }
97 
98  $this->setDeletedDate(date('Y-m-d H:i:s'));
99  $this->setForumTitle($provider->getForumTitle());
100  $this->setThreadTitle($provider->getThreadTitle());
101  $this->setPostTitle($provider->getPostTitle());
102 
103  if ($provider->getPostCensored() == 1) {
104  $this->setPostMessage($provider->getCensorshipComment());
105  } else {
106  $this->setPostMessage($provider->getPostMessage());
107  }
108 
109  $this->setPostDate($provider->getPostDate());
110  $this->setObjId($provider->getObjId());
111  $this->setRefId($provider->getRefId());
112  $this->setThreadId($provider->getThreadId());
113  $this->setForumId($provider->getForumId());
114  $this->setPosDisplayUserId($provider->getPosDisplayUserId());
115  $this->setPosUserAlias($provider->getPosUserAlias());
116  }
117  }
setPosDisplayUserId($pos_display_user_id)
user()
Definition: user.php:4
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

Member Function Documentation

◆ deleteNotifiedEntries()

ilForumPostsDeleted::deleteNotifiedEntries ( )

Definition at line 149 of file class.ilForumPostsDeleted.php.

150  {
151  $this->db->manipulateF('DELETE FROM frm_posts_deleted WHERE deleted_id > %s', array('integer'), array(0));
152  }

◆ getDeletedBy()

ilForumPostsDeleted::getDeletedBy ( )
Returns
string

Definition at line 191 of file class.ilForumPostsDeleted.php.

References $deleted_by.

Referenced by insert().

192  {
193  return $this->deleted_by;
194  }
+ Here is the caller graph for this function:

◆ getDeletedDate()

ilForumPostsDeleted::getDeletedDate ( )
Returns
null

Definition at line 175 of file class.ilForumPostsDeleted.php.

References $deleted_date.

Referenced by insert().

176  {
177  return $this->deleted_date;
178  }
+ Here is the caller graph for this function:

◆ getDeletedId()

ilForumPostsDeleted::getDeletedId ( )
Returns
int

Definition at line 159 of file class.ilForumPostsDeleted.php.

References $deleted_id.

160  {
161  return $this->deleted_id;
162  }

◆ getForumId()

ilForumPostsDeleted::getForumId ( )
Returns
int

Definition at line 335 of file class.ilForumPostsDeleted.php.

References $forum_id.

Referenced by insert().

336  {
337  return $this->forum_id;
338  }
+ Here is the caller graph for this function:

◆ getForumTitle()

ilForumPostsDeleted::getForumTitle ( )
Returns
string

Definition at line 207 of file class.ilForumPostsDeleted.php.

References $forum_title.

Referenced by insert().

208  {
209  return $this->forum_title;
210  }
+ Here is the caller graph for this function:

◆ getObjId()

ilForumPostsDeleted::getObjId ( )
Returns
int

Definition at line 287 of file class.ilForumPostsDeleted.php.

References $obj_id.

Referenced by insert().

288  {
289  return $this->obj_id;
290  }
+ Here is the caller graph for this function:

◆ getPosDisplayUserId()

ilForumPostsDeleted::getPosDisplayUserId ( )
Returns
int

Definition at line 351 of file class.ilForumPostsDeleted.php.

References $pos_display_user_id.

Referenced by insert().

+ Here is the caller graph for this function:

◆ getPostDate()

ilForumPostsDeleted::getPostDate ( )
Returns
string

Definition at line 271 of file class.ilForumPostsDeleted.php.

References $post_date.

Referenced by insert().

272  {
273  return $this->post_date;
274  }
+ Here is the caller graph for this function:

◆ getPostMessage()

ilForumPostsDeleted::getPostMessage ( )
Returns
string

Definition at line 255 of file class.ilForumPostsDeleted.php.

References $post_message.

Referenced by insert().

256  {
257  return $this->post_message;
258  }
+ Here is the caller graph for this function:

◆ getPostTitle()

ilForumPostsDeleted::getPostTitle ( )
Returns
string

Definition at line 239 of file class.ilForumPostsDeleted.php.

References $post_title.

Referenced by insert().

240  {
241  return $this->post_title;
242  }
+ Here is the caller graph for this function:

◆ getPosUserAlias()

ilForumPostsDeleted::getPosUserAlias ( )
Returns
string

Definition at line 367 of file class.ilForumPostsDeleted.php.

References $pos_usr_alias.

Referenced by insert().

368  {
369  return $this->pos_usr_alias;
370  }
+ Here is the caller graph for this function:

◆ getRefId()

ilForumPostsDeleted::getRefId ( )
Returns
int

Definition at line 303 of file class.ilForumPostsDeleted.php.

References $ref_id.

Referenced by insert().

304  {
305  return $this->ref_id;
306  }
+ Here is the caller graph for this function:

◆ getThreadId()

ilForumPostsDeleted::getThreadId ( )
Returns
int

Definition at line 319 of file class.ilForumPostsDeleted.php.

References $thread_id.

Referenced by insert().

320  {
321  return $this->thread_id;
322  }
+ Here is the caller graph for this function:

◆ getThreadTitle()

ilForumPostsDeleted::getThreadTitle ( )
Returns
string

Definition at line 223 of file class.ilForumPostsDeleted.php.

References $thread_title.

Referenced by insert().

224  {
225  return $this->thread_title;
226  }
+ Here is the caller graph for this function:

◆ insert()

ilForumPostsDeleted::insert ( )

Definition at line 122 of file class.ilForumPostsDeleted.php.

References getDeletedBy(), getDeletedDate(), getForumId(), getForumTitle(), getObjId(), getPosDisplayUserId(), getPostDate(), getPostMessage(), getPostTitle(), getPosUserAlias(), getRefId(), getThreadId(), getThreadTitle(), and isThreadDeleted().

123  {
124  $next_id = $this->db->nextId('frm_posts_deleted');
125 
126  $this->db->insert('frm_posts_deleted', array(
127  'deleted_id' => array('integer', $next_id),
128  'deleted_date' => array('timestamp', $this->getDeletedDate()),
129  'deleted_by' => array('text', $this->getDeletedBy()),
130  'forum_title' => array('text', $this->getForumTitle()),
131  'thread_title' => array('text', $this->getThreadTitle()),
132  'post_title' => array('text', $this->getPostTitle()),
133  'post_message' => array('text', $this->getPostMessage()),
134 
135  'post_date' => array('timestamp', $this->getPostDate()),
136  'obj_id' => array('integer', $this->getObjId()),
137  'ref_id' => array('integer', $this->getRefId()),
138  'thread_id' => array('integer', $this->getThreadId()),
139  'forum_id' => array('integer', $this->getForumId()),
140  'pos_display_user_id' => array('integer', $this->getPosDisplayUserId()),
141  'pos_usr_alias' => array('text', $this->getPosUserAlias()),
142  'is_thread_deleted' => array('integer', $this->isThreadDeleted())
143  ));
144  }
+ Here is the call graph for this function:

◆ isThreadDeleted()

ilForumPostsDeleted::isThreadDeleted ( )
Returns
boolean

Definition at line 383 of file class.ilForumPostsDeleted.php.

References $thread_deleted.

Referenced by insert().

384  {
385  return $this->thread_deleted;
386  }
+ Here is the caller graph for this function:

◆ setDeletedBy()

ilForumPostsDeleted::setDeletedBy (   $deleted_by)
Parameters
string$deleted_by

Definition at line 199 of file class.ilForumPostsDeleted.php.

References $deleted_by.

Referenced by __construct().

200  {
201  $this->deleted_by = $deleted_by;
202  }
+ Here is the caller graph for this function:

◆ setDeletedDate()

ilForumPostsDeleted::setDeletedDate (   $deleted_date)
Parameters
null$deleted_date

Definition at line 183 of file class.ilForumPostsDeleted.php.

References $deleted_date.

Referenced by __construct().

184  {
185  $this->deleted_date = $deleted_date;
186  }
+ Here is the caller graph for this function:

◆ setDeletedId()

ilForumPostsDeleted::setDeletedId (   $deleted_id)
Parameters
int$deleted_id

Definition at line 167 of file class.ilForumPostsDeleted.php.

References $deleted_id.

168  {
169  $this->deleted_id = $deleted_id;
170  }

◆ setForumId()

ilForumPostsDeleted::setForumId (   $forum_id)
Parameters
int$forum_id

Definition at line 343 of file class.ilForumPostsDeleted.php.

References $forum_id.

Referenced by __construct().

344  {
345  $this->forum_id = $forum_id;
346  }
+ Here is the caller graph for this function:

◆ setForumTitle()

ilForumPostsDeleted::setForumTitle (   $forum_title)
Parameters
string$forum_title

Definition at line 215 of file class.ilForumPostsDeleted.php.

References $forum_title.

Referenced by __construct().

216  {
217  $this->forum_title = $forum_title;
218  }
+ Here is the caller graph for this function:

◆ setObjId()

ilForumPostsDeleted::setObjId (   $obj_id)
Parameters
int$obj_id

Definition at line 295 of file class.ilForumPostsDeleted.php.

References $obj_id.

Referenced by __construct().

296  {
297  $this->obj_id = $obj_id;
298  }
+ Here is the caller graph for this function:

◆ setPosDisplayUserId()

ilForumPostsDeleted::setPosDisplayUserId (   $pos_display_user_id)
Parameters
int$pos_display_user_id

Definition at line 359 of file class.ilForumPostsDeleted.php.

References $pos_display_user_id.

Referenced by __construct().

360  {
361  $this->pos_display_user_id = $pos_display_user_id;
362  }
+ Here is the caller graph for this function:

◆ setPostDate()

ilForumPostsDeleted::setPostDate (   $post_date)
Parameters
string$post_date

Definition at line 279 of file class.ilForumPostsDeleted.php.

References $post_date.

Referenced by __construct().

280  {
281  $this->post_date = $post_date;
282  }
+ Here is the caller graph for this function:

◆ setPostMessage()

ilForumPostsDeleted::setPostMessage (   $post_message)
Parameters
string$post_message

Definition at line 263 of file class.ilForumPostsDeleted.php.

References $post_message.

Referenced by __construct().

264  {
265  $this->post_message = $post_message;
266  }
+ Here is the caller graph for this function:

◆ setPostTitle()

ilForumPostsDeleted::setPostTitle (   $post_title)
Parameters
string$post_title

Definition at line 247 of file class.ilForumPostsDeleted.php.

References $post_title.

Referenced by __construct().

248  {
249  $this->post_title = $post_title;
250  }
+ Here is the caller graph for this function:

◆ setPosUserAlias()

ilForumPostsDeleted::setPosUserAlias (   $pos_usr_alias)
Parameters
string$pos_usr_alias

Definition at line 375 of file class.ilForumPostsDeleted.php.

References $pos_usr_alias.

Referenced by __construct().

376  {
377  $this->pos_usr_alias = $pos_usr_alias;
378  }
+ Here is the caller graph for this function:

◆ setRefId()

ilForumPostsDeleted::setRefId (   $ref_id)
Parameters
int$ref_id

Definition at line 311 of file class.ilForumPostsDeleted.php.

References $ref_id.

Referenced by __construct().

312  {
313  $this->ref_id = $ref_id;
314  }
+ Here is the caller graph for this function:

◆ setThreadDeleted()

ilForumPostsDeleted::setThreadDeleted (   $thread_deleted)
Parameters
boolean$thread_deleted

Definition at line 391 of file class.ilForumPostsDeleted.php.

References $thread_deleted.

392  {
393  $this->thread_deleted = $thread_deleted;
394  }

◆ setThreadId()

ilForumPostsDeleted::setThreadId (   $thread_id)
Parameters
int$thread_id

Definition at line 327 of file class.ilForumPostsDeleted.php.

References $thread_id.

Referenced by __construct().

328  {
329  $this->thread_id = $thread_id;
330  }
+ Here is the caller graph for this function:

◆ setThreadTitle()

ilForumPostsDeleted::setThreadTitle (   $thread_title)
Parameters
string$thread_title

Definition at line 231 of file class.ilForumPostsDeleted.php.

References $thread_title.

Referenced by __construct().

232  {
233  $this->thread_title = $thread_title;
234  }
+ Here is the caller graph for this function:

Field Documentation

◆ $db

ilForumPostsDeleted::$db
private

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

◆ $deleted_by

ilForumPostsDeleted::$deleted_by = ''
protected

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

Referenced by getDeletedBy(), and setDeletedBy().

◆ $deleted_date

ilForumPostsDeleted::$deleted_date = null
protected

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

Referenced by getDeletedDate(), and setDeletedDate().

◆ $deleted_id

ilForumPostsDeleted::$deleted_id = 0
protected

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

Referenced by getDeletedId(), and setDeletedId().

◆ $forum_id

ilForumPostsDeleted::$forum_id = 0
protected

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

Referenced by getForumId(), and setForumId().

◆ $forum_title

ilForumPostsDeleted::$forum_title = ''
protected

Definition at line 26 of file class.ilForumPostsDeleted.php.

Referenced by getForumTitle(), and setForumTitle().

◆ $obj_id

ilForumPostsDeleted::$obj_id = 0
protected

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

Referenced by getObjId(), and setObjId().

◆ $pos_display_user_id

ilForumPostsDeleted::$pos_display_user_id = 0
protected

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

Referenced by getPosDisplayUserId(), and setPosDisplayUserId().

◆ $pos_usr_alias

ilForumPostsDeleted::$pos_usr_alias = ''
protected

Definition at line 71 of file class.ilForumPostsDeleted.php.

Referenced by getPosUserAlias(), and setPosUserAlias().

◆ $post_date

ilForumPostsDeleted::$post_date = ''
protected

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

Referenced by getPostDate(), and setPostDate().

◆ $post_message

ilForumPostsDeleted::$post_message = ''
protected

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

Referenced by getPostMessage(), and setPostMessage().

◆ $post_title

ilForumPostsDeleted::$post_title = ''
protected

Definition at line 35 of file class.ilForumPostsDeleted.php.

Referenced by getPostTitle(), and setPostTitle().

◆ $ref_id

ilForumPostsDeleted::$ref_id = 0
protected

Definition at line 53 of file class.ilForumPostsDeleted.php.

Referenced by getRefId(), and setRefId().

◆ $thread_deleted

ilForumPostsDeleted::$thread_deleted = false
protected

Definition at line 76 of file class.ilForumPostsDeleted.php.

Referenced by isThreadDeleted(), and setThreadDeleted().

◆ $thread_id

ilForumPostsDeleted::$thread_id = 0
protected

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

Referenced by getThreadId(), and setThreadId().

◆ $thread_title

ilForumPostsDeleted::$thread_title = ''
protected

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

Referenced by getThreadTitle(), and setThreadTitle().

◆ $user

ilForumPostsDeleted::$user
private

Definition at line 78 of file class.ilForumPostsDeleted.php.


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