|
ILIAS
release_7 Revision v7.30-3-g800a261c036
|
Collaboration diagram for ilForumTopic:Public Member Functions | |
| __construct ($a_id=0, $a_is_moderator=false, $preventImplicitRead=false) | |
| Constructor. More... | |
| assignData ($data) | |
| insert () | |
| Inserts the object data into database. More... | |
| update () | |
| Updates an existing topic. More... | |
| reload () | |
| Calls the private method read() to load the topic data from database into the object. More... | |
| getFirstPostId () | |
| Fetches the primary key of the first post node of the current topic from database and returns it. More... | |
| updateVisits () | |
| Updates the visit counter of the current topic. More... | |
| countPosts ($ignoreRoot=false) | |
| Fetches and returns the number of posts for the given user id. More... | |
| countActivePosts ($ignoreRoot=false) | |
| Fetches and returns the number of active posts for the given user id. More... | |
| getFirstPostNode ($isModerator=false, $preventImplicitRead=false) | |
| Fetches and returns an object of the first post in the current topic. More... | |
| getLastPost () | |
| Fetches and returns an object of the last post in the current topic. More... | |
| getLastActivePost () | |
| Fetches and returns an object of the last active post in the current topic. More... | |
| 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. More... | |
| movePosts ($old_obj_id, $old_pk, $new_obj_id, $new_pk) | |
| Moves all posts within the current thread to a new forum. More... | |
| getNestedSetPostChildren ($pos_id=null, $levels=null) | |
| isNotificationEnabled ($a_user_id) | |
| Check whether a user's notification about new posts in a thread is enabled (result > 0) or not (result == 0). More... | |
| enableNotification ($a_user_id) | |
| Enable a user's notification about new posts in a thread. More... | |
| disableNotification ($a_user_id) | |
| Disable a user's notification about new posts in a thread. More... | |
| makeSticky () | |
| Sets the current topic sticky. More... | |
| unmakeSticky () | |
| Sets the current topic non-sticky. More... | |
| close () | |
| Closes the current topic. More... | |
| reopen () | |
| Reopens the current topic. More... | |
| getAverageRating () | |
| setAverageRating ($average_rating) | |
| setId ($a_id) | |
| getId () | |
| setForumId ($a_forum_id) | |
| getForumId () | |
| setDisplayUserId ($a_user_id) | |
| getDisplayUserId () | |
| setUserAlias ($a_user_alias) | |
| getUserAlias () | |
| setSubject ($a_subject) | |
| getSubject () | |
| setCreateDate ($a_createdate) | |
| getCreateDate () | |
| setChangeDate ($a_changedate) | |
| getChangeDate () | |
| setImportName ($a_import_name) | |
| getImportName () | |
| 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 () | |
| setThrAuthorId ($thr_author_id) | |
| getThrAuthorId () | |
| updateThreadTitle () | |
| setNumPosts ($a_num_posts) | |
| getNumPosts () | |
| setNumNewPosts ($num_new_posts) | |
| getNumNewPosts () | |
| setNumUnreadPosts ($num_unread_posts) | |
| getNumUnreadPosts () | |
| setUserNotificationEnabled ($user_notification_enabled) | |
| getUserNotificationEnabled () | |
| setOrderDirection ($direction) | |
| getOrderDirection () | |
| getSorting () | |
| updateMergedThread () | |
| getLastPostForThreadOverview () | |
| setLastPostForThreadOverview (ilForumPost $post) | |
Static Public Member Functions | |
| static | _lookupTitle ($a_topic_id) |
| Looks up the title/subject of a topic/thread. More... | |
| static | lookupForumIdByTopicId ($a_topic_id) |
| static | _lookupDate ($thread_id) |
Static Protected Attributes | |
| static | $possibleOrderDirections = array('ASC', 'DESC') |
Private Member Functions | |
| read () | |
| Reads the data of the current object id from database and loads it into the object. More... | |
Private Attributes | |
| $id = 0 | |
| $forum_id = 0 | |
| $frm_obj_id = 0 | |
| $display_user_id = 0 | |
| $user_alias = '' | |
| $subject = '' | |
| $createdate = null | |
| $changedate = null | |
| $num_posts = 0 | |
| $last_post_string = '' | |
| $visits = 0 | |
| $import_name = '' | |
| $is_sticky = 0 | |
| $is_closed = 0 | |
| $orderField = '' | |
| $last_post = null | |
| $db = null | |
| $is_moderator = false | |
| $thr_author_id = 0 | |
| $average_rating = 0 | |
| $orderDirection = 'DESC' | |
Definition at line 10 of file class.ilForumTopic.php.
| ilForumTopic::__construct | ( | $a_id = 0, |
|
$a_is_moderator = false, |
|||
$preventImplicitRead = 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) |
| bool | $preventImplicitRead | Prevents the implicit database query if an id was passed |
@access public
Definition at line 72 of file class.ilForumTopic.php.
References $DIC, read(), and user().
Here is the call graph for this function:
|
static |
| integer | $thread_id |
Definition at line 1304 of file class.ilForumTopic.php.
References $DIC, $ilDB, and $res.
Referenced by ilObjForumGUI\confirmMergeThreadsObject().
Here is the caller graph for this function:
|
static |
Looks up the title/subject of a topic/thread.
| integer | id of the topic/thread |
Definition at line 1144 of file class.ilForumTopic.php.
References $DIC, $ilDB, and $res.
Referenced by ilObjForumGUI\confirmMergeThreadsObject().
Here is the caller graph for this function:| ilForumTopic::assignData | ( | $data | ) |
| $data |
Definition at line 89 of file class.ilForumTopic.php.
References $data, setAverageRating(), setChangeDate(), setClosed(), setCreateDate(), setDisplayUserId(), setForumId(), setId(), setImportName(), setLastPostString(), setNumNewPosts(), setNumPosts(), setNumUnreadPosts(), setSticky(), setSubject(), setThrAuthorId(), setUserAlias(), setUserNotificationEnabled(), and setVisits().
Here is the call graph for this function:| ilForumTopic::close | ( | ) |
Closes the current topic.
Definition at line 933 of file class.ilForumTopic.php.
| ilForumTopic::countActivePosts | ( | $ignoreRoot = false | ) |
Fetches and returns the number of active posts for the given user id.
| bool | $ignoreRoot |
Definition at line 330 of file class.ilForumTopic.php.
References $res, ilDBConstants\FETCHMODE_ASSOC, and user().
Here is the call graph for this function:| ilForumTopic::countPosts | ( | $ignoreRoot = false | ) |
Fetches and returns the number of posts for the given user id.
| integer | $a_user_id | user id |
Definition at line 306 of file class.ilForumTopic.php.
References $res, and ilDBConstants\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 857 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 826 of file class.ilForumTopic.php.
References isNotificationEnabled().
Referenced by ilForum\generateThread().
Here is the call graph for this function:
Here is the caller graph for this function:| ilForumTopic::getAllPosts | ( | ) |
Definition at line 434 of file class.ilForumTopic.php.
References $res, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by movePosts().
Here is the caller graph for this function:| ilForumTopic::getAverageRating | ( | ) |
Definition at line 982 of file class.ilForumTopic.php.
References $average_rating.
| ilForumTopic::getChangeDate | ( | ) |
| ilForumTopic::getCreateDate | ( | ) |
Definition at line 1039 of file class.ilForumTopic.php.
References $createdate.
Referenced by ilForum\generateThread().
Here is the caller graph for this function:| ilForumTopic::getDisplayUserId | ( | ) |
Definition at line 1015 of file class.ilForumTopic.php.
References $display_user_id.
Referenced by ilForum\generateThread().
Here is the caller graph for this function:| ilForumTopic::getFirstPostId | ( | ) |
Fetches the primary key of the first post node of the current topic from database and returns it.
Definition at line 255 of file class.ilForumTopic.php.
References $res, and ilDBConstants\FETCHMODE_OBJECT.
| ilForumTopic::getFirstPostNode | ( | $isModerator = false, |
|
$preventImplicitRead = false |
|||
| ) |
Fetches and returns an object of the first post in the current topic.
| bool | $isModerator | |
| bool | $preventImplicitRead |
Definition at line 355 of file class.ilForumTopic.php.
References $res.
Referenced by updateThreadTitle().
Here is the caller graph for this function:| ilForumTopic::getForumId | ( | ) |
Definition at line 1007 of file class.ilForumTopic.php.
References $forum_id.
Referenced by ilForumExportGUI\ensureThreadBelongsToForum(), ilObjForumGUI\ensureThreadBelongsToForum(), and ilForum\generateThread().
Here is the caller graph for this function:| ilForumTopic::getFrmObjId | ( | ) |
Definition at line 1115 of file class.ilForumTopic.php.
References $frm_obj_id.
Referenced by getNestedSetPostChildren().
Here is the caller graph for this function:| ilForumTopic::getId | ( | ) |
Definition at line 999 of file class.ilForumTopic.php.
References $id.
Referenced by ilForum\generateThread(), updateMergedThread(), and updateThreadTitle().
Here is the caller graph for this function:| ilForumTopic::getImportName | ( | ) |
| ilForumTopic::getLastActivePost | ( | ) |
Fetches and returns an object of the last active post in the current topic.
Definition at line 410 of file class.ilForumTopic.php.
References $res, ilDBConstants\FETCHMODE_OBJECT, and user().
Here is the call graph for this function:| ilForumTopic::getLastPost | ( | ) |
Fetches and returns an object of the last post in the current topic.
Definition at line 382 of file class.ilForumTopic.php.
References $res, and ilDBConstants\FETCHMODE_OBJECT.
| ilForumTopic::getLastPostForThreadOverview | ( | ) |
Definition at line 1323 of file class.ilForumTopic.php.
References $last_post.
| ilForumTopic::getLastPostString | ( | ) |
Definition at line 1071 of file class.ilForumTopic.php.
References $last_post_string.
Referenced by updateMergedThread().
Here is the caller graph for this function:| ilForumTopic::getModeratorRight | ( | ) |
| ilForumTopic::getNestedSetPostChildren | ( | $pos_id = null, |
|
$levels = null |
|||
| ) |
Definition at line 661 of file class.ilForumTopic.php.
References $data, $i, $query, $res, ANONYMOUS_USER_ID, getFrmObjId(), ilForumProperties\getInstance(), ilForumAuthorInformationCache\preloadUserObjects(), and user().
Here is the call graph for this function:| ilForumTopic::getNumNewPosts | ( | ) |
Definition at line 1210 of file class.ilForumTopic.php.
| ilForumTopic::getNumPosts | ( | ) |
Definition at line 1192 of file class.ilForumTopic.php.
References $num_posts.
Referenced by updateMergedThread().
Here is the caller graph for this function:| ilForumTopic::getNumUnreadPosts | ( | ) |
Definition at line 1228 of file class.ilForumTopic.php.
| ilForumTopic::getOrderDirection | ( | ) |
Definition at line 1261 of file class.ilForumTopic.php.
References $orderDirection.
Referenced by getPostTree().
Here is the caller graph for this function:| ilForumTopic::getOrderField | ( | ) |
| 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 464 of file class.ilForumTopic.php.
References $data, $query, $res, ANONYMOUS_USER_ID, ilForumPost\getLft(), getOrderDirection(), ilForumPost\getRgt(), ilForumPost\getThreadId(), ilForumAuthorInformationCache\preloadUserObjects(), and user().
Here is the call graph for this function:| ilForumTopic::getSorting | ( | ) |
Definition at line 1282 of file class.ilForumTopic.php.
| ilForumTopic::getSubject | ( | ) |
Definition at line 1031 of file class.ilForumTopic.php.
References $subject.
Referenced by ilForum\generateThread(), updateMergedThread(), and updateThreadTitle().
Here is the caller graph for this function:| ilForumTopic::getThrAuthorId | ( | ) |
Definition at line 1131 of file class.ilForumTopic.php.
References $thr_author_id.
Referenced by ilForum\generateThread().
Here is the caller graph for this function:| ilForumTopic::getUserAlias | ( | ) |
Definition at line 1023 of file class.ilForumTopic.php.
References $user_alias.
Referenced by ilForum\generateThread().
Here is the caller graph for this function:| ilForumTopic::getUserNotificationEnabled | ( | ) |
Definition at line 1246 of file class.ilForumTopic.php.
| ilForumTopic::getVisits | ( | ) |
Definition at line 1079 of file class.ilForumTopic.php.
References $visits.
Referenced by updateMergedThread().
Here is the caller graph for this function:| ilForumTopic::insert | ( | ) |
Inserts the object data into database.
Definition at line 119 of file class.ilForumTopic.php.
Referenced by ilForum\generateThread().
Here is the caller graph for this function:| ilForumTopic::isClosed | ( | ) |
Definition at line 1095 of file class.ilForumTopic.php.
References true.
| 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 799 of file class.ilForumTopic.php.
References $result.
Referenced by enableNotification().
Here is the caller graph for this function:| ilForumTopic::isSticky | ( | ) |
Definition at line 1087 of file class.ilForumTopic.php.
References true.
|
static |
Definition at line 1266 of file class.ilForumTopic.php.
References $DIC, $ilDB, and $res.
Referenced by ilObjForumGUI\confirmMergeThreadsObject().
Here is the caller graph for this function:| ilForumTopic::makeSticky | ( | ) |
Sets the current topic sticky.
Definition at line 881 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 546 of file class.ilForumTopic.php.
References $id, $ilDB, ilForum\_lookupObjIdForForumId(), ilDBConstants\FETCHMODE_ASSOC, getAllPosts(), and ilNewsItem\getFirstNewsIdForContext().
Here is the call graph for this function:
|
private |
Reads the data of the current object id from database and loads it into the object.
@access private
Definition at line 196 of file class.ilForumTopic.php.
References $res, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by __construct(), and reload().
Here is the caller graph for this function:| ilForumTopic::reload | ( | ) |
Calls the private method read() to load the topic data from database into the object.
Definition at line 244 of file class.ilForumTopic.php.
References read().
Here is the call graph for this function:| ilForumTopic::reopen | ( | ) |
Reopens the current topic.
Definition at line 959 of file class.ilForumTopic.php.
| ilForumTopic::setAverageRating | ( | $average_rating | ) |
| int | $average_rating |
Definition at line 990 of file class.ilForumTopic.php.
References $average_rating.
Referenced by assignData().
Here is the caller graph for this function:| ilForumTopic::setChangeDate | ( | $a_changedate | ) |
Definition at line 1043 of file class.ilForumTopic.php.
Referenced by assignData().
Here is the caller graph for this function:| ilForumTopic::setClosed | ( | $a_closed | ) |
Definition at line 1091 of file class.ilForumTopic.php.
Referenced by assignData().
Here is the caller graph for this function:| ilForumTopic::setCreateDate | ( | $a_createdate | ) |
Definition at line 1035 of file class.ilForumTopic.php.
Referenced by assignData(), and ilForum\generateThread().
Here is the caller graph for this function:| ilForumTopic::setDisplayUserId | ( | $a_user_id | ) |
Definition at line 1011 of file class.ilForumTopic.php.
Referenced by assignData().
Here is the caller graph for this function:| ilForumTopic::setForumId | ( | $a_forum_id | ) |
Definition at line 1003 of file class.ilForumTopic.php.
Referenced by assignData().
Here is the caller graph for this function:| ilForumTopic::setId | ( | $a_id | ) |
Definition at line 995 of file class.ilForumTopic.php.
Referenced by assignData().
Here is the caller graph for this function:| ilForumTopic::setImportName | ( | $a_import_name | ) |
Definition at line 1055 of file class.ilForumTopic.php.
Referenced by assignData(), and ilForum\generateThread().
Here is the caller graph for this function:| ilForumTopic::setLastPostForThreadOverview | ( | ilForumPost | $post | ) |
| ilForumPost | $post |
Definition at line 1331 of file class.ilForumTopic.php.
| ilForumTopic::setLastPostString | ( | $a_last_post | ) |
Definition at line 1063 of file class.ilForumTopic.php.
Referenced by assignData().
Here is the caller graph for this function:| ilForumTopic::setModeratorRight | ( | $bool | ) |
Definition at line 1107 of file class.ilForumTopic.php.
| ilForumTopic::setNumNewPosts | ( | $num_new_posts | ) |
| int | $num_new_posts |
Definition at line 1201 of file class.ilForumTopic.php.
Referenced by assignData().
Here is the caller graph for this function:| ilForumTopic::setNumPosts | ( | $a_num_posts | ) |
| $a_num_posts |
Definition at line 1183 of file class.ilForumTopic.php.
Referenced by assignData().
Here is the caller graph for this function:| ilForumTopic::setNumUnreadPosts | ( | $num_unread_posts | ) |
| int | $num_unread_posts |
Definition at line 1219 of file class.ilForumTopic.php.
Referenced by assignData().
Here is the caller graph for this function:| ilForumTopic::setOrderDirection | ( | $direction | ) |
Definition at line 1251 of file class.ilForumTopic.php.
| ilForumTopic::setOrderField | ( | $a_order_field | ) |
Definition at line 1099 of file class.ilForumTopic.php.
| ilForumTopic::setSticky | ( | $a_sticky | ) |
Definition at line 1083 of file class.ilForumTopic.php.
Referenced by assignData().
Here is the caller graph for this function:| ilForumTopic::setSubject | ( | $a_subject | ) |
Definition at line 1027 of file class.ilForumTopic.php.
Referenced by assignData().
Here is the caller graph for this function:| ilForumTopic::setThrAuthorId | ( | $thr_author_id | ) |
| int | $thr_author_id |
Definition at line 1123 of file class.ilForumTopic.php.
References $thr_author_id.
Referenced by assignData().
Here is the caller graph for this function:| ilForumTopic::setUserAlias | ( | $a_user_alias | ) |
Definition at line 1019 of file class.ilForumTopic.php.
Referenced by assignData().
Here is the caller graph for this function:| ilForumTopic::setUserNotificationEnabled | ( | $user_notification_enabled | ) |
| boolean | $user_notification_enabled |
Definition at line 1237 of file class.ilForumTopic.php.
Referenced by assignData().
Here is the caller graph for this function:| ilForumTopic::setVisits | ( | $a_visits | ) |
Definition at line 1075 of file class.ilForumTopic.php.
Referenced by assignData().
Here is the caller graph for this function:| ilForumTopic::unmakeSticky | ( | ) |
Sets the current topic non-sticky.
Definition at line 907 of file class.ilForumTopic.php.
| ilForumTopic::update | ( | ) |
Updates an existing topic.
Definition at line 158 of file class.ilForumTopic.php.
| ilForumTopic::updateMergedThread | ( | ) |
Definition at line 1286 of file class.ilForumTopic.php.
References getId(), getLastPostString(), getNumPosts(), getSubject(), and getVisits().
Here is the call graph for this function:| ilForumTopic::updateThreadTitle | ( | ) |
Definition at line 1166 of file class.ilForumTopic.php.
References getFirstPostNode(), getId(), and getSubject().
Here is the call graph for this function:| ilForumTopic::updateVisits | ( | ) |
Updates the visit counter of the current topic.
@access public
Definition at line 279 of file class.ilForumTopic.php.
|
private |
Definition at line 54 of file class.ilForumTopic.php.
Referenced by getAverageRating(), and setAverageRating().
|
private |
Definition at line 26 of file class.ilForumTopic.php.
Referenced by getChangeDate().
|
private |
Definition at line 24 of file class.ilForumTopic.php.
Referenced by getCreateDate().
|
private |
Definition at line 45 of file class.ilForumTopic.php.
|
private |
Definition at line 18 of file class.ilForumTopic.php.
Referenced by getDisplayUserId().
|
private |
Definition at line 14 of file class.ilForumTopic.php.
Referenced by getForumId().
|
private |
Definition at line 16 of file class.ilForumTopic.php.
Referenced by getFrmObjId().
|
private |
Definition at line 12 of file class.ilForumTopic.php.
Referenced by getId(), movePosts(), and updateVisits().
|
private |
Definition at line 34 of file class.ilForumTopic.php.
Referenced by getImportName().
|
private |
Definition at line 38 of file class.ilForumTopic.php.
|
private |
Definition at line 47 of file class.ilForumTopic.php.
Referenced by getModeratorRight().
|
private |
Definition at line 36 of file class.ilForumTopic.php.
|
private |
Definition at line 43 of file class.ilForumTopic.php.
Referenced by getLastPostForThreadOverview().
|
private |
Definition at line 30 of file class.ilForumTopic.php.
Referenced by getLastPostString().
|
private |
Definition at line 28 of file class.ilForumTopic.php.
Referenced by getNumPosts().
|
private |
Definition at line 56 of file class.ilForumTopic.php.
Referenced by getOrderDirection().
|
private |
Definition at line 40 of file class.ilForumTopic.php.
Referenced by getOrderField().
|
staticprotected |
Definition at line 58 of file class.ilForumTopic.php.
|
private |
Definition at line 22 of file class.ilForumTopic.php.
Referenced by getSubject().
|
private |
Definition at line 49 of file class.ilForumTopic.php.
Referenced by getThrAuthorId(), and setThrAuthorId().
|
private |
Definition at line 20 of file class.ilForumTopic.php.
Referenced by getUserAlias().
|
private |
Definition at line 32 of file class.ilForumTopic.php.
Referenced by getVisits().