| 
    ILIAS
    release_9 Revision v9.13-25-g2c18ec4c24f
    
   | 
  
 Collaboration diagram for ilForumTopic:Public Member Functions | |
| __construct (private int $id=0, private bool $is_moderator=false, bool $preventImplicitRead=false) | |
| Returns an object of a forum topic.  More... | |
| assignData (array $data) | |
| insert () | |
| update () | |
| reload () | |
| getPostRootId () | |
| getFirstVisiblePostId () | |
| updateVisits () | |
| countPosts (bool $ignoreRoot=false) | |
| countActivePosts (bool $ignoreRoot=false) | |
| getPostRootNode (bool $isModerator=false, bool $preventImplicitRead=false) | |
| getFirstVisiblePostNode (bool $isModerator=false, bool $preventImplicitRead=false) | |
| getLastPost () | |
| getLastActivePost () | |
| getAllPostIds () | |
| 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 (int $old_obj_id, int $old_pk, int $new_obj_id, int $new_pk) | |
| Moves all posts within the current thread to a new forum.  More... | |
| getNestedSetPostChildren (?int $pos_id=null, ?int $num_levels=null) | |
| isNotificationEnabled (int $a_user_id) | |
| enableNotification (int $a_user_id) | |
| disableNotification (int $a_user_id) | |
| makeSticky () | |
| unmakeSticky () | |
| close () | |
| reopen () | |
| getAverageRating () | |
| setAverageRating (float $average_rating) | |
| setId (int $a_id) | |
| getId () | |
| setForumId (int $a_forum_id) | |
| getForumId () | |
| setDisplayUserId (int $a_user_id) | |
| getDisplayUserId () | |
| setUserAlias (?string $a_user_alias) | |
| getUserAlias () | |
| setSubject (string $a_subject) | |
| getSubject () | |
| setCreateDate (?string $a_createdate) | |
| getCreateDate () | |
| setChangeDate (?string $a_changedate) | |
| getChangeDate () | |
| setImportName (?string $a_import_name) | |
| getImportName () | |
| setLastPostString (?string $a_last_post) | |
| getLastPostString () | |
| setVisits (int $a_visits) | |
| getVisits () | |
| setSticky (bool $a_sticky) | |
| isSticky () | |
| setClosed (bool $a_closed) | |
| isClosed () | |
| setOrderField (string $a_order_field) | |
| getOrderField () | |
| getFrmObjId () | |
| setThrAuthorId (int $thr_author_id) | |
| getThrAuthorId () | |
| updateThreadTitle () | |
| setNumPosts (int $a_num_posts) | |
| getNumPosts () | |
| setNumUnreadPosts (int $num_unread_posts) | |
| getNumUnreadPosts () | |
| setUserNotificationEnabled (bool $status) | |
| isUserNotificationEnabled () | |
| setOrderDirection (string $direction) | |
| getOrderDirection () | |
| updateMergedThread () | |
| getLastPostForThreadOverview () | |
| setLastPostForThreadOverview (ilForumPost $post) | |
Static Public Member Functions | |
| static | lookupTitle (int $a_topic_id) | 
| static | lookupForumIdByTopicId (int $a_topic_id) | 
| static | lookupCreationDate (int $thread_id) | 
Static Protected Attributes | |
| static array | $possibleOrderDirections = ['ASC', 'DESC'] | 
Private Member Functions | |
| read () | |
Private Attributes | |
| int | $forum_id = 0 | 
| int | $frm_obj_id = 0 | 
| int | $display_user_id = 0 | 
| string | $user_alias = null | 
| string | $subject = '' | 
| string | $createdate = null | 
| string | $changedate = null | 
| int | $num_posts = 0 | 
| string | $last_post_string = null | 
| int | $visits = 0 | 
| string | $import_name = null | 
| bool | $is_sticky = false | 
| bool | $is_closed = false | 
| string | $orderField = '' | 
| ilForumPost | $last_post = null | 
| ilDBInterface | $db | 
| int | $thr_author_id = 0 | 
| float | $average_rating = 0.0 | 
| string | $orderDirection = 'DESC' | 
| ilObjUser | $user | 
| int | $num_unread_posts = 0 | 
| bool | $user_notification_enabled = false | 
Definition at line 25 of file class.ilForumTopic.php.
| ilForumTopic::__construct | ( | private int | $id = 0,  | 
        
| private bool | $is_moderator = false,  | 
        ||
| bool | $preventImplicitRead = false  | 
        ||
| ) | 
Returns an object of a forum topic.
The constructor calls the private method read() to load the topic data from database into the object.
| int | $id | primary key of a forum topic (optional) | 
| bool | $is_moderator | moderator-status of the current user (optional) | 
| bool | $preventImplicitRead | Prevents the implicit database query if an id was passed | 
Definition at line 58 of file class.ilForumTopic.php.
References $DIC, read(), and ILIAS\Repository\user().
 Here is the call graph for this function:| ilForumTopic::assignData | ( | array | $data | ) | 
Definition at line 72 of file class.ilForumTopic.php.
References setAverageRating(), setChangeDate(), setClosed(), setCreateDate(), setDisplayUserId(), setForumId(), setId(), setImportName(), setLastPostString(), setNumPosts(), setNumUnreadPosts(), setSticky(), setSubject(), setThrAuthorId(), setUserAlias(), setUserNotificationEnabled(), and setVisits().
 Here is the call graph for this function:| ilForumTopic::close | ( | ) | 
Definition at line 819 of file class.ilForumTopic.php.
| ilForumTopic::countActivePosts | ( | bool | $ignoreRoot = false | ) | 
Definition at line 276 of file class.ilForumTopic.php.
References $id, $res, and ILIAS\Repository\user().
 Here is the call graph for this function:| ilForumTopic::countPosts | ( | bool | $ignoreRoot = false | ) | 
| ilForumTopic::disableNotification | ( | int | $a_user_id | ) | 
Definition at line 776 of file class.ilForumTopic.php.
| ilForumTopic::enableNotification | ( | int | $a_user_id | ) | 
Definition at line 758 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::getAllPostIds | ( | ) | 
Definition at line 391 of file class.ilForumTopic.php.
References $res, ilDBConstants\FETCHMODE_OBJECT, and ILIAS\Repository\int().
Referenced by movePosts().
 Here is the call graph for this function:
 Here is the caller graph for this function:| ilForumTopic::getAverageRating | ( | ) | 
| ilForumTopic::getChangeDate | ( | ) | 
| ilForumTopic::getCreateDate | ( | ) | 
Definition at line 909 of file class.ilForumTopic.php.
References $createdate.
Referenced by ilForum\generateThread().
 Here is the caller graph for this function:| ilForumTopic::getDisplayUserId | ( | ) | 
Definition at line 879 of file class.ilForumTopic.php.
References $display_user_id.
Referenced by ilForum\generateThread(), and ilObjForumGUI\getThreadProperties().
 Here is the caller graph for this function:| ilForumTopic::getFirstVisiblePostId | ( | ) | 
Definition at line 226 of file class.ilForumTopic.php.
References $res.
| ilForumTopic::getFirstVisiblePostNode | ( | bool | $isModerator = false,  | 
        
| bool | $preventImplicitRead = false  | 
        ||
| ) | 
Definition at line 322 of file class.ilForumTopic.php.
Referenced by updateThreadTitle().
 Here is the caller graph for this function:| ilForumTopic::getForumId | ( | ) | 
Definition at line 869 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 984 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 859 of file class.ilForumTopic.php.
References $id.
Referenced by ilForum\generateThread(), ilObjForumGUI\getActionsForThreadOverview(), ilObjForumGUI\getEditTitleModal(), ilObjForumGUI\getOpenCloseActionForThread(), ilObjForumGUI\getStickyActionForThread(), ilObjForumGUI\getThreadProperties(), updateMergedThread(), and updateThreadTitle().
 Here is the caller graph for this function:| ilForumTopic::getImportName | ( | ) | 
Definition at line 929 of file class.ilForumTopic.php.
References $import_name.
Referenced by ilObjForumGUI\getThreadProperties().
 Here is the caller graph for this function:| ilForumTopic::getLastActivePost | ( | ) | 
Definition at line 365 of file class.ilForumTopic.php.
References $res, and ILIAS\Repository\user().
 Here is the call graph for this function:| ilForumTopic::getLastPost | ( | ) | 
Definition at line 347 of file class.ilForumTopic.php.
References $res.
Referenced by ilObjForumGUI\getThreadProperties().
 Here is the caller graph for this function:| ilForumTopic::getLastPostForThreadOverview | ( | ) | 
Definition at line 1131 of file class.ilForumTopic.php.
References $last_post.
| ilForumTopic::getLastPostString | ( | ) | 
Definition at line 939 of file class.ilForumTopic.php.
References $last_post_string.
Referenced by updateMergedThread().
 Here is the caller graph for this function:| ilForumTopic::getNestedSetPostChildren | ( | ?int | $pos_id = null,  | 
        
| ?int | $num_levels = null  | 
        ||
| ) | 
Definition at line 584 of file class.ilForumTopic.php.
References $data, $res, ANONYMOUS_USER_ID, getFrmObjId(), ilForumProperties\getInstance(), ILIAS\Repository\int(), ilForumAuthorInformationCache\preloadUserObjects(), and ILIAS\Repository\user().
 Here is the call graph for this function:| ilForumTopic::getNumPosts | ( | ) | 
Definition at line 1039 of file class.ilForumTopic.php.
References $num_posts.
Referenced by ilObjForumGUI\getThreadProperties(), and updateMergedThread().
 Here is the caller graph for this function:| ilForumTopic::getNumUnreadPosts | ( | ) | 
Definition at line 1050 of file class.ilForumTopic.php.
References $num_unread_posts.
Referenced by ilObjForumGUI\getThreadProperties().
 Here is the caller graph for this function:| ilForumTopic::getOrderDirection | ( | ) | 
Definition at line 1076 of file class.ilForumTopic.php.
References $orderDirection.
Referenced by getPostTree().
 Here is the caller graph for this function:| ilForumTopic::getOrderField | ( | ) | 
| ilForumTopic::getPostRootId | ( | ) | 
Definition at line 211 of file class.ilForumTopic.php.
References $res.
| ilForumTopic::getPostRootNode | ( | bool | $isModerator = false,  | 
        
| bool | $preventImplicitRead = false  | 
        ||
| ) | 
Definition at line 298 of file class.ilForumTopic.php.
Referenced by ilObjForumGUI\toggleExplorerNodeStateObject().
 Here is the caller graph for this function:| 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 412 of file class.ilForumTopic.php.
References $data, $post, $res, ANONYMOUS_USER_ID, ilForumPost\getLft(), getOrderDirection(), ilForumPost\getRgt(), ilForumPost\getThreadId(), ILIAS\Repository\int(), ilForumAuthorInformationCache\preloadUserObjects(), and ILIAS\Repository\user().
 Here is the call graph for this function:| ilForumTopic::getSubject | ( | ) | 
Definition at line 899 of file class.ilForumTopic.php.
References $subject.
Referenced by ilForum\generateThread(), ilObjForumGUI\getEditTitleModal(), updateMergedThread(), and updateThreadTitle().
 Here is the caller graph for this function:| ilForumTopic::getThrAuthorId | ( | ) | 
Definition at line 994 of file class.ilForumTopic.php.
References $thr_author_id.
Referenced by ilForum\generateThread(), and ilObjForumGUI\getThreadProperties().
 Here is the caller graph for this function:| ilForumTopic::getUserAlias | ( | ) | 
Definition at line 889 of file class.ilForumTopic.php.
References $user_alias.
Referenced by ilForum\generateThread(), and ilObjForumGUI\getThreadProperties().
 Here is the caller graph for this function:| ilForumTopic::getVisits | ( | ) | 
Definition at line 949 of file class.ilForumTopic.php.
References $visits.
Referenced by ilObjForumGUI\getThreadProperties(), and updateMergedThread().
 Here is the caller graph for this function:| ilForumTopic::insert | ( | ) | 
Definition at line 101 of file class.ilForumTopic.php.
Referenced by ilForum\generateThread().
 Here is the caller graph for this function:| ilForumTopic::isClosed | ( | ) | 
Definition at line 969 of file class.ilForumTopic.php.
References $is_closed.
Referenced by ilObjForumGUI\getOpenCloseActionForThread().
 Here is the caller graph for this function:| ilForumTopic::isNotificationEnabled | ( | int | $a_user_id | ) | 
Definition at line 739 of file class.ilForumTopic.php.
Referenced by enableNotification().
 Here is the caller graph for this function:| ilForumTopic::isSticky | ( | ) | 
Definition at line 959 of file class.ilForumTopic.php.
References $is_sticky.
Referenced by ilObjForumGUI\getStickyActionForThread(), ilObjForumGUI\getThreadProperties(), and ilObjForumGUI\markTopThreadInOverview().
 Here is the caller graph for this function:| ilForumTopic::isUserNotificationEnabled | ( | ) | 
Definition at line 1061 of file class.ilForumTopic.php.
References $user_notification_enabled.
      
  | 
  static | 
Definition at line 1111 of file class.ilForumTopic.php.
References $DIC, $ilDB, and $res.
Referenced by ilObjForumGUI\confirmMergeThreadsObject().
 Here is the caller graph for this function:
      
  | 
  static | 
Definition at line 1081 of file class.ilForumTopic.php.
References $DIC, $ilDB, and $res.
Referenced by ilObjForumGUI\confirmMergeThreadsObject().
 Here is the caller graph for this function:
      
  | 
  static | 
Definition at line 999 of file class.ilForumTopic.php.
References $DIC, $ilDB, and $res.
Referenced by ilObjForumGUI\confirmMergeThreadsObject().
 Here is the caller graph for this function:| ilForumTopic::makeSticky | ( | ) | 
Definition at line 787 of file class.ilForumTopic.php.
| ilForumTopic::movePosts | ( | int | $old_obj_id, | 
| int | $old_pk, | ||
| int | $new_obj_id, | ||
| int | $new_pk | ||
| ) | 
Moves all posts within the current thread to a new forum.
| int | $old_obj_id | object id of the current forum | 
| int | $old_pk | primary key of old forum | 
| int | $new_obj_id | object id of the new forum | 
| int | $new_pk | primary key of new forum | 
| ilFileUtilsException | 
Definition at line 501 of file class.ilForumTopic.php.
References $id, $ilDB, $post, $res, ilForum\_lookupObjIdForForumId(), getAllPostIds(), ilNewsItem\getFirstNewsIdForContext(), and ilDBInterface\manipulateF().
 Here is the call graph for this function:
      
  | 
  private | 
Definition at line 165 of file class.ilForumTopic.php.
References $res, ilDBConstants\FETCHMODE_OBJECT, and ILIAS\Repository\int().
Referenced by __construct(), and reload().
 Here is the call graph for this function:
 Here is the caller graph for this function:| ilForumTopic::reload | ( | ) | 
Definition at line 206 of file class.ilForumTopic.php.
References read().
 Here is the call graph for this function:| ilForumTopic::reopen | ( | ) | 
Definition at line 831 of file class.ilForumTopic.php.
| ilForumTopic::setAverageRating | ( | float | $average_rating | ) | 
Definition at line 849 of file class.ilForumTopic.php.
References $average_rating.
Referenced by assignData().
 Here is the caller graph for this function:| ilForumTopic::setChangeDate | ( | ?string | $a_changedate | ) | 
Definition at line 914 of file class.ilForumTopic.php.
Referenced by assignData().
 Here is the caller graph for this function:| ilForumTopic::setClosed | ( | bool | $a_closed | ) | 
Definition at line 964 of file class.ilForumTopic.php.
Referenced by assignData().
 Here is the caller graph for this function:| ilForumTopic::setCreateDate | ( | ?string | $a_createdate | ) | 
Definition at line 904 of file class.ilForumTopic.php.
Referenced by assignData(), and ilForum\generateThread().
 Here is the caller graph for this function:| ilForumTopic::setDisplayUserId | ( | int | $a_user_id | ) | 
Definition at line 874 of file class.ilForumTopic.php.
Referenced by assignData().
 Here is the caller graph for this function:| ilForumTopic::setForumId | ( | int | $a_forum_id | ) | 
Definition at line 864 of file class.ilForumTopic.php.
Referenced by assignData().
 Here is the caller graph for this function:| ilForumTopic::setId | ( | int | $a_id | ) | 
Definition at line 854 of file class.ilForumTopic.php.
Referenced by assignData().
 Here is the caller graph for this function:| ilForumTopic::setImportName | ( | ?string | $a_import_name | ) | 
Definition at line 924 of file class.ilForumTopic.php.
Referenced by assignData(), and ilForum\generateThread().
 Here is the caller graph for this function:| ilForumTopic::setLastPostForThreadOverview | ( | ilForumPost | $post | ) | 
Definition at line 1136 of file class.ilForumTopic.php.
References $post.
| ilForumTopic::setLastPostString | ( | ?string | $a_last_post | ) | 
Definition at line 934 of file class.ilForumTopic.php.
Referenced by assignData().
 Here is the caller graph for this function:| ilForumTopic::setNumPosts | ( | int | $a_num_posts | ) | 
Definition at line 1033 of file class.ilForumTopic.php.
Referenced by assignData().
 Here is the caller graph for this function:| ilForumTopic::setNumUnreadPosts | ( | int | $num_unread_posts | ) | 
Definition at line 1044 of file class.ilForumTopic.php.
References $num_unread_posts.
Referenced by assignData().
 Here is the caller graph for this function:| ilForumTopic::setOrderDirection | ( | string | $direction | ) | 
Definition at line 1066 of file class.ilForumTopic.php.
| ilForumTopic::setOrderField | ( | string | $a_order_field | ) | 
Definition at line 974 of file class.ilForumTopic.php.
| ilForumTopic::setSticky | ( | bool | $a_sticky | ) | 
Definition at line 954 of file class.ilForumTopic.php.
Referenced by assignData().
 Here is the caller graph for this function:| ilForumTopic::setSubject | ( | string | $a_subject | ) | 
Definition at line 894 of file class.ilForumTopic.php.
Referenced by assignData().
 Here is the caller graph for this function:| ilForumTopic::setThrAuthorId | ( | int | $thr_author_id | ) | 
Definition at line 989 of file class.ilForumTopic.php.
References $thr_author_id.
Referenced by assignData().
 Here is the caller graph for this function:| ilForumTopic::setUserAlias | ( | ?string | $a_user_alias | ) | 
Definition at line 884 of file class.ilForumTopic.php.
Referenced by assignData().
 Here is the caller graph for this function:| ilForumTopic::setUserNotificationEnabled | ( | bool | $status | ) | 
Definition at line 1055 of file class.ilForumTopic.php.
Referenced by assignData().
 Here is the caller graph for this function:| ilForumTopic::setVisits | ( | int | $a_visits | ) | 
Definition at line 944 of file class.ilForumTopic.php.
Referenced by assignData().
 Here is the caller graph for this function:| ilForumTopic::unmakeSticky | ( | ) | 
Definition at line 803 of file class.ilForumTopic.php.
| ilForumTopic::update | ( | ) | 
Definition at line 134 of file class.ilForumTopic.php.
| ilForumTopic::updateMergedThread | ( | ) | 
Definition at line 1097 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 1017 of file class.ilForumTopic.php.
References getFirstVisiblePostNode(), getId(), and getSubject().
 Here is the call graph for this function:| ilForumTopic::updateVisits | ( | ) | 
Definition at line 241 of file class.ilForumTopic.php.
References ilSession\get(), and ilSession\set().
 Here is the call graph for this function:
      
  | 
  private | 
Definition at line 44 of file class.ilForumTopic.php.
Referenced by getAverageRating(), and setAverageRating().
      
  | 
  private | 
Definition at line 33 of file class.ilForumTopic.php.
Referenced by getChangeDate().
      
  | 
  private | 
Definition at line 32 of file class.ilForumTopic.php.
Referenced by getCreateDate().
      
  | 
  private | 
Definition at line 42 of file class.ilForumTopic.php.
      
  | 
  private | 
Definition at line 29 of file class.ilForumTopic.php.
Referenced by getDisplayUserId().
      
  | 
  private | 
Definition at line 27 of file class.ilForumTopic.php.
Referenced by getForumId().
      
  | 
  private | 
Definition at line 28 of file class.ilForumTopic.php.
Referenced by getFrmObjId().
      
  | 
  private | 
Definition at line 37 of file class.ilForumTopic.php.
Referenced by getImportName().
      
  | 
  private | 
Definition at line 39 of file class.ilForumTopic.php.
Referenced by isClosed().
      
  | 
  private | 
Definition at line 38 of file class.ilForumTopic.php.
Referenced by isSticky().
      
  | 
  private | 
Definition at line 41 of file class.ilForumTopic.php.
Referenced by getLastPostForThreadOverview().
      
  | 
  private | 
Definition at line 35 of file class.ilForumTopic.php.
Referenced by getLastPostString().
      
  | 
  private | 
Definition at line 34 of file class.ilForumTopic.php.
Referenced by getNumPosts().
      
  | 
  private | 
Definition at line 48 of file class.ilForumTopic.php.
Referenced by getNumUnreadPosts(), and setNumUnreadPosts().
      
  | 
  private | 
Definition at line 45 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 46 of file class.ilForumTopic.php.
      
  | 
  private | 
Definition at line 31 of file class.ilForumTopic.php.
Referenced by getSubject().
      
  | 
  private | 
Definition at line 43 of file class.ilForumTopic.php.
Referenced by getThrAuthorId(), and setThrAuthorId().
      
  | 
  private | 
Definition at line 47 of file class.ilForumTopic.php.
      
  | 
  private | 
Definition at line 30 of file class.ilForumTopic.php.
Referenced by getUserAlias().
      
  | 
  private | 
Definition at line 49 of file class.ilForumTopic.php.
Referenced by isUserNotificationEnabled().
      
  | 
  private | 
Definition at line 36 of file class.ilForumTopic.php.
Referenced by getVisits().