ILIAS
Release_3_10_x_branch Revision 61812
|
Public Member Functions | |
__construct ($a_id=0, $a_is_moderator=false) | |
Constructor. | |
insert () | |
Inserts the object data into database. | |
update () | |
Updates an existing topic. | |
reload () | |
Calls the private method read() to load the topic data from database into the object. | |
getFirstPostId () | |
Fetches the primary key of the first post node of the current topic from database and returns it. | |
updateVisits () | |
Updates the visit counter of the current topic. | |
getLastThreadAccess ($a_user_id) | |
Fetches and returns a timestamp of the last topic access. | |
countPosts () | |
Fetches and returns the number of posts for the given user id. | |
countActivePosts () | |
Fetches and returns the number of active posts for the given user id. | |
countReadPosts ($a_user_id) | |
Fetches and returns the number of read posts for the given user id. | |
countReadActivePosts ($a_user_id) | |
Fetches and returns the number of read active posts for the given user id. | |
countNewPosts ($a_user_id) | |
Fetches and returns the number of new posts for the given user id. | |
countNewActivePosts ($a_user_id) | |
Fetches and returns the number of new active posts for the given user id. | |
getFirstPostNode () | |
Fetches and returns an object of the first post in the current topic. | |
getLastPost () | |
Fetches and returns an object of the last post in the current topic. | |
getLastActivePost () | |
Fetches and returns an object of the last active post in the current topic. | |
getAllPosts () | |
getPostTree (ilForumPost $a_post_node) | |
Fetches and returns an array of posts from the post tree, starting with the node object passed by the first paramter. | |
movePosts ($old_obj_id, $old_pk, $new_obj_id, $new_pk) | |
Moves all posts within the current thread to a new forum. | |
getPostChilds ($a_node_id, $type= '') | |
Fetches and returns an array of posts from the post tree, starting with the node id passed by the first paramter. | |
isNotificationEnabled ($a_user_id) | |
Check whether a user's notification about new posts in a thread is enabled (result > 0) or not (result == 0). | |
enableNotification ($a_user_id) | |
Enable a user's notification about new posts in a thread. | |
disableNotification ($a_user_id) | |
Disable a user's notification about new posts in a thread. | |
makeSticky () | |
Sets the current topic sticky. | |
unmakeSticky () | |
Sets the current topic non-sticky. | |
close () | |
Closes the current topic. | |
reopen () | |
Reopens the current topic. | |
setId ($a_id) | |
getId () | |
setForumId ($a_forum_id) | |
getForumId () | |
setUserId ($a_user_id) | |
getUserId () | |
setUserAlias ($a_user_alias) | |
getUserAlias () | |
setSubject ($a_subject) | |
getSubject () | |
setCreateDate ($a_createdate) | |
getCreateDate () | |
setChangeDate ($a_changedate) | |
getChangeDate () | |
setImportName ($a_import_name) | |
getImportName () | |
setNumPosts ($a_num_posts) | |
getNumPosts () | |
setLastPostString ($a_last_post) | |
getLastPostString () | |
setVisits ($a_visits) | |
getVisits () | |
setSticky ($a_sticky) | |
isSticky () | |
setClosed ($a_closed) | |
isClosed () | |
setOrderField ($a_order_field) | |
getOrderField () | |
setModeratorRight ($bool) | |
getModeratorRight () | |
getFrmObjId () |
Private Member Functions | |
read () | |
Reads the data of the current object id from database and loads it into the object. |
Private Attributes | |
$id = 0 | |
$forum_id = 0 | |
$frm_obj_id = 0 | |
$user_id = 0 | |
$user_alias = '' | |
$subject = '' | |
$createdate = '0000-00-00 00:00:00' | |
$changedate = '0000-00-00 00:00:00' | |
$num_posts = 0 | |
$last_post_string = '' | |
$visits = 0 | |
$import_name = '' | |
$is_sticky = 0 | |
$is_closed = 0 | |
$orderField = '' | |
$posts = array() | |
$db = null | |
$is_moderator = false |
Definition at line 32 of file class.ilForumTopic.php.
ilForumTopic::__construct | ( | $a_id = 0 , |
|
$a_is_moderator = false |
|||
) |
Constructor.
Returns an object of a forum topic. The constructor calls the private method read() to load the topic data from database into the object.
integer | $a_id | primary key of a forum topic (optional) |
bool | $a_is_moderator | moderator-status of the current user (optional) |
public
Definition at line 81 of file class.ilForumTopic.php.
References read().
ilForumTopic::close | ( | ) |
Closes the current topic.
Definition at line 854 of file class.ilForumTopic.php.
ilForumTopic::countActivePosts | ( | ) |
Fetches and returns the number of active posts for the given user id.
integer | $a_user_id | user id |
Definition at line 304 of file class.ilForumTopic.php.
References $res, and DB_FETCHMODE_ASSOC.
ilForumTopic::countNewActivePosts | ( | $a_user_id | ) |
Fetches and returns the number of new active posts for the given user id.
integer | $a_user_id | user id |
Definition at line 404 of file class.ilForumTopic.php.
References $res, DB_FETCHMODE_ASSOC, and getLastThreadAccess().
ilForumTopic::countNewPosts | ( | $a_user_id | ) |
Fetches and returns the number of new posts for the given user id.
integer | $a_user_id | user id |
Definition at line 377 of file class.ilForumTopic.php.
References $res, DB_FETCHMODE_ASSOC, and getLastThreadAccess().
ilForumTopic::countPosts | ( | ) |
Fetches and returns the number of posts for the given user id.
integer | $a_user_id | user id |
Definition at line 283 of file class.ilForumTopic.php.
References $res, and DB_FETCHMODE_ASSOC.
ilForumTopic::countReadActivePosts | ( | $a_user_id | ) |
Fetches and returns the number of read active posts for the given user id.
integer | $a_user_id | user id |
Definition at line 351 of file class.ilForumTopic.php.
References $res, and DB_FETCHMODE_ASSOC.
ilForumTopic::countReadPosts | ( | $a_user_id | ) |
Fetches and returns the number of read posts for the given user id.
integer | $a_user_id | user id |
Definition at line 328 of file class.ilForumTopic.php.
References $res, and DB_FETCHMODE_ASSOC.
ilForumTopic::disableNotification | ( | $a_user_id | ) |
Disable a user's notification about new posts in a thread.
integer | $a_user_id | id of an user |
Definition at line 781 of file class.ilForumTopic.php.
ilForumTopic::enableNotification | ( | $a_user_id | ) |
Enable a user's notification about new posts in a thread.
integer | $a_user_id | id of an user |
Definition at line 755 of file class.ilForumTopic.php.
References isNotificationEnabled().
ilForumTopic::getAllPosts | ( | ) |
Definition at line 506 of file class.ilForumTopic.php.
References $posts, $res, and DB_FETCHMODE_OBJECT.
Referenced by movePosts().
ilForumTopic::getChangeDate | ( | ) |
Definition at line 950 of file class.ilForumTopic.php.
References $changedate.
ilForumTopic::getCreateDate | ( | ) |
Definition at line 942 of file class.ilForumTopic.php.
References $createdate.
ilForumTopic::getFirstPostId | ( | ) |
Fetches the primary key of the first post node of the current topic from database and returns it.
Definition at line 211 of file class.ilForumTopic.php.
References $res, and DB_FETCHMODE_OBJECT.
ilForumTopic::getFirstPostNode | ( | ) |
Fetches and returns an object of the first post in the current topic.
Definition at line 433 of file class.ilForumTopic.php.
References $res, and DB_FETCHMODE_OBJECT.
Referenced by ilForumExportGUI\exportHTML(), and ilForumExportGUI\printThread().
ilForumTopic::getForumId | ( | ) |
Definition at line 910 of file class.ilForumTopic.php.
References $forum_id.
ilForumTopic::getFrmObjId | ( | ) |
Definition at line 1018 of file class.ilForumTopic.php.
References $frm_obj_id.
ilForumTopic::getId | ( | ) |
Definition at line 902 of file class.ilForumTopic.php.
References $id.
Referenced by ilForumExplorer\ilForumExplorer().
ilForumTopic::getImportName | ( | ) |
Definition at line 958 of file class.ilForumTopic.php.
References $import_name.
ilForumTopic::getLastActivePost | ( | ) |
Fetches and returns an object of the last active post in the current topic.
Definition at line 482 of file class.ilForumTopic.php.
References $res, and DB_FETCHMODE_OBJECT.
ilForumTopic::getLastPost | ( | ) |
Fetches and returns an object of the last post in the current topic.
Definition at line 455 of file class.ilForumTopic.php.
References $res, and DB_FETCHMODE_OBJECT.
ilForumTopic::getLastPostString | ( | ) |
Definition at line 974 of file class.ilForumTopic.php.
References $last_post_string.
ilForumTopic::getLastThreadAccess | ( | $a_user_id | ) |
Fetches and returns a timestamp of the last topic access.
integer | $a_user_id | user id |
Definition at line 255 of file class.ilForumTopic.php.
References $res, and DB_FETCHMODE_OBJECT.
Referenced by countNewActivePosts(), and countNewPosts().
ilForumTopic::getModeratorRight | ( | ) |
Definition at line 1014 of file class.ilForumTopic.php.
References $orderField.
ilForumTopic::getNumPosts | ( | ) |
Definition at line 966 of file class.ilForumTopic.php.
References $num_posts.
ilForumTopic::getOrderField | ( | ) |
Definition at line 1006 of file class.ilForumTopic.php.
References $orderField.
ilForumTopic::getPostChilds | ( | $a_node_id, | |
$type = '' |
|||
) |
Fetches and returns an array of posts from the post tree, starting with the node id passed by the first paramter.
If the second parameter $type is set to 'explorer', the data will be returned different because of compatibility issues in explorer view.
integer | $a_node_id | id of starting node |
string | $type | 'explorer' or '' (optional) |
Definition at line 675 of file class.ilForumTopic.php.
References DB_FETCHMODE_OBJECT.
ilForumTopic::getPostTree | ( | ilForumPost | $a_post_node | ) |
Fetches and returns an array of posts from the post tree, starting with the node object passed by the first paramter.
ilForumPost | $a_post_node | node-object of a post |
Definition at line 535 of file class.ilForumTopic.php.
References $posts, $res, DB_FETCHMODE_OBJECT, ilForumPost\getLft(), ilForumPost\getRgt(), and ilForumPost\getThreadId().
ilForumTopic::getSubject | ( | ) |
Definition at line 934 of file class.ilForumTopic.php.
References $subject.
ilForumTopic::getUserAlias | ( | ) |
Definition at line 926 of file class.ilForumTopic.php.
References $user_alias.
ilForumTopic::getUserId | ( | ) |
Definition at line 918 of file class.ilForumTopic.php.
References $user_id.
ilForumTopic::getVisits | ( | ) |
Definition at line 982 of file class.ilForumTopic.php.
References $visits.
ilForumTopic::insert | ( | ) |
Inserts the object data into database.
Definition at line 97 of file class.ilForumTopic.php.
ilForumTopic::isClosed | ( | ) |
Definition at line 998 of file class.ilForumTopic.php.
ilForumTopic::isNotificationEnabled | ( | $a_user_id | ) |
Check whether a user's notification about new posts in a thread is enabled (result > 0) or not (result == 0).
integer | $a_user_id | id of an user |
Definition at line 729 of file class.ilForumTopic.php.
References $result.
Referenced by enableNotification().
ilForumTopic::isSticky | ( | ) |
Definition at line 990 of file class.ilForumTopic.php.
ilForumTopic::makeSticky | ( | ) |
Sets the current topic sticky.
Definition at line 804 of file class.ilForumTopic.php.
ilForumTopic::movePosts | ( | $old_obj_id, | |
$old_pk, | |||
$new_obj_id, | |||
$new_pk | |||
) |
Moves all posts within the current thread to a new forum.
integer | $old_obj_id | object id of the current forum |
integer | $old_pk | primary key of old forum |
integer | $new_obj_id | object id of the new forum |
integer | $new_pk | primary key of new forum |
Definition at line 605 of file class.ilForumTopic.php.
References $posts, $res, ilForum\_lookupObjIdForForumId(), DB_FETCHMODE_ASSOC, getAllPosts(), and ilNewsItem\getFirstNewsIdForContext().
|
private |
Reads the data of the current object id from database and loads it into the object.
private
Definition at line 157 of file class.ilForumTopic.php.
Referenced by __construct(), and reload().
ilForumTopic::reload | ( | ) |
Calls the private method read() to load the topic data from database into the object.
Definition at line 200 of file class.ilForumTopic.php.
References read().
ilForumTopic::reopen | ( | ) |
Reopens the current topic.
Definition at line 879 of file class.ilForumTopic.php.
ilForumTopic::setChangeDate | ( | $a_changedate | ) |
Definition at line 946 of file class.ilForumTopic.php.
ilForumTopic::setClosed | ( | $a_closed | ) |
Definition at line 994 of file class.ilForumTopic.php.
ilForumTopic::setCreateDate | ( | $a_createdate | ) |
Definition at line 938 of file class.ilForumTopic.php.
ilForumTopic::setForumId | ( | $a_forum_id | ) |
Definition at line 906 of file class.ilForumTopic.php.
ilForumTopic::setId | ( | $a_id | ) |
Definition at line 898 of file class.ilForumTopic.php.
ilForumTopic::setImportName | ( | $a_import_name | ) |
Definition at line 954 of file class.ilForumTopic.php.
ilForumTopic::setLastPostString | ( | $a_last_post | ) |
Definition at line 970 of file class.ilForumTopic.php.
ilForumTopic::setModeratorRight | ( | $bool | ) |
Definition at line 1010 of file class.ilForumTopic.php.
ilForumTopic::setNumPosts | ( | $a_num_posts | ) |
Definition at line 962 of file class.ilForumTopic.php.
ilForumTopic::setOrderField | ( | $a_order_field | ) |
Definition at line 1002 of file class.ilForumTopic.php.
ilForumTopic::setSticky | ( | $a_sticky | ) |
Definition at line 986 of file class.ilForumTopic.php.
ilForumTopic::setSubject | ( | $a_subject | ) |
Definition at line 930 of file class.ilForumTopic.php.
ilForumTopic::setUserAlias | ( | $a_user_alias | ) |
Definition at line 922 of file class.ilForumTopic.php.
ilForumTopic::setUserId | ( | $a_user_id | ) |
Definition at line 914 of file class.ilForumTopic.php.
ilForumTopic::setVisits | ( | $a_visits | ) |
Definition at line 978 of file class.ilForumTopic.php.
ilForumTopic::unmakeSticky | ( | ) |
Sets the current topic non-sticky.
Definition at line 829 of file class.ilForumTopic.php.
ilForumTopic::update | ( | ) |
Updates an existing topic.
Definition at line 130 of file class.ilForumTopic.php.
ilForumTopic::updateVisits | ( | ) |
Updates the visit counter of the current topic.
public
Definition at line 229 of file class.ilForumTopic.php.
References $_SESSION.
|
private |
Definition at line 48 of file class.ilForumTopic.php.
Referenced by getChangeDate().
|
private |
Definition at line 46 of file class.ilForumTopic.php.
Referenced by getCreateDate().
|
private |
Definition at line 66 of file class.ilForumTopic.php.
|
private |
Definition at line 36 of file class.ilForumTopic.php.
Referenced by getForumId().
|
private |
Definition at line 38 of file class.ilForumTopic.php.
Referenced by getFrmObjId().
|
private |
Definition at line 34 of file class.ilForumTopic.php.
Referenced by getId().
|
private |
Definition at line 56 of file class.ilForumTopic.php.
Referenced by getImportName().
|
private |
Definition at line 60 of file class.ilForumTopic.php.
|
private |
Definition at line 68 of file class.ilForumTopic.php.
|
private |
Definition at line 58 of file class.ilForumTopic.php.
|
private |
Definition at line 52 of file class.ilForumTopic.php.
Referenced by getLastPostString().
|
private |
Definition at line 50 of file class.ilForumTopic.php.
Referenced by getNumPosts().
|
private |
Definition at line 62 of file class.ilForumTopic.php.
Referenced by getModeratorRight(), and getOrderField().
|
private |
Definition at line 64 of file class.ilForumTopic.php.
Referenced by getAllPosts(), getPostTree(), and movePosts().
|
private |
Definition at line 44 of file class.ilForumTopic.php.
Referenced by getSubject().
|
private |
Definition at line 42 of file class.ilForumTopic.php.
Referenced by getUserAlias().
|
private |
Definition at line 40 of file class.ilForumTopic.php.
Referenced by getUserId().
|
private |
Definition at line 54 of file class.ilForumTopic.php.
Referenced by getVisits().