ILIAS
release_8 Revision v8.19
|
Class Forum core functions for forum. More...
Public Member Functions | |
__construct () | |
setForumId (int $a_obj_id) | |
setForumRefId (int $a_ref_id) | |
getForumId () | |
getForumRefId () | |
setDbTable (string $dbTable) | |
getDbTable () | |
setMDB2WhereCondition (string $query_string, array $data_type, array $data_value) | |
getMDB2Query () | |
getMDB2DataValue () | |
getMDB2DataType () | |
setPageHits (int $pageHits) | |
getPageHits () | |
getOneTopic () | |
getOneThread () | |
generateThread (ilForumTopic $thread, string $message, bool $notify, bool $notify_posts, bool $status=true, bool $withFirstVisibleEntry=true) | |
moveThreads (array $thread_ids, ilObjForum $src_forum, int $target_obj_id) | |
postCensorship (ilObjForum $forum, string $message, int $pos_pk, int $cens=0) | |
deletePost ($postIdOrRecord, bool $raiseEvents=true) | |
getAllThreads (int $a_topic_id, array $params=[], int $limit=0, int $offset=0) | |
getNumberOfPublishedUserPostings (int $usr_id, bool $post_activation_required) | |
getUserStatistics (bool $post_activation_required) | |
getRootPostIdByThread (int $a_thread_id) | |
getModerators () | |
countUserArticles (int $a_user_id) | |
countActiveUserArticles (int $a_user_id) | |
convertDate (string $date) | |
addPostTree (int $a_tree_id, int $a_node_id=-1, string $a_date='') | |
insertPostNode (int $a_node_id, int $a_parent_id, int $tree_id, string $a_date='') | |
insert node under parent node More... | |
getPostDepth (int $a_node_id, int $tree_id) | |
getFirstPostNode (int $tree_id) | |
getPostNode (int $post_id) | |
fetchPostNodeData (stdClass $a_row) | |
deletePostTree (array $a_node) | |
updateVisits (int $ID) | |
prepareText (string $text, int $edit=0, string $quote_user='', string $type='') | |
getImportName () | |
setImportName (string $a_import_name) | |
enableForumNotification (int $user_id) | |
disableForumNotification (int $user_id) | |
isForumNotificationEnabled (int $user_id) | |
isThreadNotificationEnabled (int $user_id, int $thread_id) | |
mergeThreads (int $source_id, int $target_id) | |
Static Public Member Functions | |
static | _getModerators (int $a_ref_id) |
static | _isModerator (int $a_ref_id, int $a_usr_id) |
static | getSortedThreadSubjects (int $a_obj_id, int $a_sort_mode=self::SORT_DATE) |
static | _lookupObjIdForForumId (int $a_for_id) |
Data Fields | |
ilLanguage | $lng |
ilErrorHandling | $error |
ilDBInterface | $db |
ilObjUser | $user |
ilSetting | $settings |
Static Protected Attributes | |
static array | $moderators_by_ref_id_map = [] |
Private Member Functions | |
deletePostFiles (array $a_ids) | |
Private Attributes | |
const | SORT_TITLE = 1 |
const | SORT_DATE = 2 |
const | DEFAULT_PAGE_HITS = 30 |
ilAppEventHandler | $event |
string | $dbTable |
string | $className = 'ilForum' |
string | $mdb2Query = '' |
array | $mdb2DataValue = [] |
array | $mdb2DataType = [] |
string | $txtQuote1 = "[quote]" |
string | $txtQuote2 = "[/quote]" |
string | $replQuote1 = '<blockquote class="ilForumQuote">' |
string | $replQuote2 = '</blockquote>' |
int | $pageHits = self::DEFAULT_PAGE_HITS |
int | $id |
int | $ref_id |
string | $import_name = '' |
Class Forum core functions for forum.
Definition at line 27 of file class.ilForum.php.
ilForum::__construct | ( | ) |
Definition at line 56 of file class.ilForum.php.
References $DIC, ILIAS\Repository\lng(), ILIAS\Repository\settings(), and ILIAS\Repository\user().
|
static |
int | $a_ref_id |
Definition at line 1130 of file class.ilForum.php.
References $DIC, and ilObject\_lookupTitle().
Referenced by ilForumNotificationDataProvider\getPostActivationRecipients(), ilForumSettingsGUI\saveEventsForUser(), ilForumSettingsGUI\showMembers(), and ilForumSettingsGUI\updateUserNotifications().
|
static |
Definition at line 1146 of file class.ilForum.php.
Referenced by ilObjForumGUI\renderDraftContent(), ilObjForumGUI\renderPostContent(), and ilForumExportGUI\renderPostHtml().
|
static |
Definition at line 1695 of file class.ilForum.php.
Referenced by ilObjMediaObject\getParentObjectIdForUsage(), ilForumDraftsDerivedTaskProvider\getTasks(), ilObjForumGUI\mergeThreadsObject(), and ilForumTopic\movePosts().
ilForum::addPostTree | ( | int | $a_tree_id, |
int | $a_node_id = -1 , |
||
string | $a_date = '' |
||
) |
Definition at line 1191 of file class.ilForum.php.
Referenced by getOneThread().
ilForum::convertDate | ( | string | $date | ) |
Definition at line 1186 of file class.ilForum.php.
References ilDatePresentation\formatDate(), and IL_CAL_DATETIME.
ilForum::countActiveUserArticles | ( | int | $a_user_id | ) |
Definition at line 1170 of file class.ilForum.php.
References $res, getForumId(), and ILIAS\Repository\user().
ilForum::countUserArticles | ( | int | $a_user_id | ) |
Definition at line 1155 of file class.ilForum.php.
References $res, and getForumId().
ilForum::deletePost | ( | $postIdOrRecord, | |
bool | $raiseEvents = true |
||
) |
int|array<string,mixed> | $postIdOrRecord | |
bool | $raiseEvents |
Definition at line 533 of file class.ilForum.php.
References Vendor\Package\$e, $i, $mobs, $post, $query, $res, ilObjForum\_deleteAccessEntries(), ilObjForum\_deleteReadEntries(), ilObjMediaObject\_exists(), ilObjMediaObject\_getMobsOfObject(), ilObjMediaObject\_removeUsage(), deletePostFiles(), deletePostTree(), ilNewsItem\getFirstNewsIdForContext(), getForumId(), getForumRefId(), getPostNode(), and ILIAS\Repository\int().
Referenced by mergeThreads().
|
private |
int[] | $a_ids |
Definition at line 1543 of file class.ilForum.php.
References getForumId().
Referenced by deletePost().
ilForum::deletePostTree | ( | array | $a_node | ) |
array | $a_node |
Definition at line 1389 of file class.ilForum.php.
References $res, and ILIAS\Repository\int().
Referenced by deletePost().
ilForum::disableForumNotification | ( | int | $user_id | ) |
Definition at line 1620 of file class.ilForum.php.
ilForum::enableForumNotification | ( | int | $user_id | ) |
Definition at line 1565 of file class.ilForum.php.
References $query, $res, and isForumNotificationEnabled().
ilForum::fetchPostNodeData | ( | stdClass | $a_row | ) |
Definition at line 1338 of file class.ilForum.php.
References ilObject\_exists(), ILIAS\Repository\int(), and ILIAS\Repository\lng().
Referenced by getFirstPostNode(), and getPostNode().
ilForum::generateThread | ( | ilForumTopic | $thread, |
string | $message, | ||
bool | $notify, | ||
bool | $notify_posts, | ||
bool | $status = true , |
||
bool | $withFirstVisibleEntry = true |
||
) |
Definition at line 285 of file class.ilForum.php.
References $message, ilForumTopic\enableNotification(), ilForumTopic\getCreateDate(), ilForumTopic\getDisplayUserId(), ilForumTopic\getForumId(), ilForumTopic\getId(), getImportName(), ilForumTopic\getSubject(), ilForumTopic\getThrAuthorId(), ilForumTopic\getUserAlias(), ilForumTopic\insert(), ilForumTopic\setCreateDate(), and ilForumTopic\setImportName().
ilForum::getAllThreads | ( | int | $a_topic_id, |
array | $params = [] , |
||
int | $limit = 0 , |
||
int | $offset = 0 |
||
) |
int | $a_topic_id | |
array | $params | |
int | $limit | |
int | $offset |
Definition at line 744 of file class.ilForum.php.
References $data, $params, $query, $res, ilForumProperties\FORUM_OVERVIEW_WITH_NEW_POSTS, getForumId(), ilForumProperties\getInstance(), ILIAS\Repository\int(), ilObjForum\NEWS_NEW_CONSIDERATION_WEEKS, ILIAS\Repository\settings(), and ILIAS\Repository\user().
ilForum::getDbTable | ( | ) |
ilForum::getFirstPostNode | ( | int | $tree_id | ) |
Definition at line 1308 of file class.ilForum.php.
References $res, and fetchPostNodeData().
ilForum::getForumId | ( | ) |
Definition at line 78 of file class.ilForum.php.
References $id.
Referenced by countActiveUserArticles(), countUserArticles(), deletePost(), deletePostFiles(), getAllThreads(), getNumberOfPublishedUserPostings(), getOneThread(), getUserStatistics(), and mergeThreads().
ilForum::getForumRefId | ( | ) |
Definition at line 83 of file class.ilForum.php.
References $ref_id.
Referenced by deletePost(), getModerators(), getOneThread(), and postCensorship().
ilForum::getImportName | ( | ) |
Definition at line 1555 of file class.ilForum.php.
References $import_name.
Referenced by generateThread(), and getOneThread().
ilForum::getMDB2DataType | ( | ) |
Definition at line 121 of file class.ilForum.php.
Referenced by getOneThread(), getOneTopic(), and updateVisits().
ilForum::getMDB2DataValue | ( | ) |
Definition at line 116 of file class.ilForum.php.
Referenced by getOneThread(), getOneTopic(), and updateVisits().
ilForum::getMDB2Query | ( | ) |
Definition at line 111 of file class.ilForum.php.
Referenced by getOneThread(), getOneTopic(), and updateVisits().
ilForum::getModerators | ( | ) |
Definition at line 1121 of file class.ilForum.php.
References getForumRefId().
ilForum::getNumberOfPublishedUserPostings | ( | int | $usr_id, |
bool | $post_activation_required | ||
) |
Definition at line 1006 of file class.ilForum.php.
References $query, $res, and getForumId().
ilForum::getOneThread | ( | ) |
Definition at line 165 of file class.ilForum.php.
References $message, $query, ilRTE\_replaceMediaObjectImageSrc(), addPostTree(), getForumId(), getForumRefId(), getImportName(), ilForumProperties\getInstance(), ilObjectFactory\getInstanceByRefId(), getMDB2DataType(), getMDB2DataValue(), getMDB2Query(), insertPostNode(), NEWS_NOTICE, NEWS_USERS, and prepareText().
ilForum::getOneTopic | ( | ) |
Definition at line 141 of file class.ilForum.php.
References $query, $res, ForumDto\getEmptyInstance(), ForumDto\getInstanceFromArray(), getMDB2DataType(), getMDB2DataValue(), and getMDB2Query().
Referenced by moveThreads().
ilForum::getPageHits | ( | ) |
ilForum::getPostDepth | ( | int | $a_node_id, |
int | $tree_id | ||
) |
Definition at line 1290 of file class.ilForum.php.
References $res.
Referenced by insertPostNode().
ilForum::getPostNode | ( | int | $post_id | ) |
Definition at line 1323 of file class.ilForum.php.
References $res, and fetchPostNodeData().
Referenced by deletePost(), and mergeThreads().
ilForum::getRootPostIdByThread | ( | int | $a_thread_id | ) |
|
static |
int | $a_obj_id | |
int | $a_sort_mode |
Definition at line 1666 of file class.ilForum.php.
References $DIC, $res, and ILIAS\Repository\int().
Referenced by ilObjForumSearchResultTableGUI\parse().
ilForum::getUserStatistics | ( | bool | $post_activation_required | ) |
bool | $post_activation_required |
Definition at line 1039 of file class.ilForum.php.
References $data, $query, $res, getForumId(), ILIAS\Repository\int(), ilPersonalProfileMode\PROFILE_ENABLED_GLOBAL, ilPersonalProfileMode\PROFILE_ENABLED_LOGGED_IN_USERS, and ILIAS\Repository\user().
ilForum::insertPostNode | ( | int | $a_node_id, |
int | $a_parent_id, | ||
int | $tree_id, | ||
string | $a_date = '' |
||
) |
insert node under parent node
Definition at line 1224 of file class.ilForum.php.
References $res, getPostDepth(), and ILIAS\Repository\int().
Referenced by getOneThread().
ilForum::isForumNotificationEnabled | ( | int | $user_id | ) |
Definition at line 1631 of file class.ilForum.php.
References $res.
Referenced by enableForumNotification().
ilForum::isThreadNotificationEnabled | ( | int | $user_id, |
int | $thread_id | ||
) |
ilForum::mergeThreads | ( | int | $source_id, |
int | $target_id | ||
) |
Definition at line 1707 of file class.ilForum.php.
References Vendor\Package\$e, $ilDB, ilObjForum\_deleteAccessEntries(), deletePost(), getForumId(), getPostNode(), ilObjForum\mergeForumUserRead(), ilForumPost\mergePosts(), ilForumNotification\mergeThreadNotifications(), and ilForumPostsTree\updateTargetRootRgt().
ilForum::moveThreads | ( | array | $thread_ids, |
ilObjForum | $src_forum, | ||
int | $target_obj_id | ||
) |
int[] | $thread_ids | |
ilObjForum | $src_forum | |
int | $target_obj_id |
Definition at line 351 of file class.ilForum.php.
References $res, ilObject\getId(), getOneTopic(), ILIAS\Repository\lng(), and setMDB2WhereCondition().
ilForum::postCensorship | ( | ilObjForum | $forum, |
string | $message, | ||
int | $pos_pk, | ||
int | $cens = 0 |
||
) |
Definition at line 469 of file class.ilForum.php.
References $res, ilNewsItem\getFirstNewsIdForContext(), getForumRefId(), prepareText(), and ILIAS\Repository\user().
ilForum::prepareText | ( | string | $text, |
int | $edit = 0 , |
||
string | $quote_user = '' , |
||
string | $type = '' |
||
) |
Definition at line 1463 of file class.ilForum.php.
References $i, $replQuote2, $txtQuote2, $type, ilMathJax\getInstance(), and ILIAS\Repository\lng().
Referenced by ilObjForumGUI\doHistoryCheck(), getOneThread(), and postCensorship().
ilForum::setDbTable | ( | string | $dbTable | ) |
ilForum::setForumId | ( | int | $a_obj_id | ) |
Definition at line 68 of file class.ilForum.php.
ilForum::setForumRefId | ( | int | $a_ref_id | ) |
Definition at line 73 of file class.ilForum.php.
ilForum::setImportName | ( | string | $a_import_name | ) |
Definition at line 1560 of file class.ilForum.php.
ilForum::setMDB2WhereCondition | ( | string | $query_string, |
array | $data_type, | ||
array | $data_value | ||
) |
Definition at line 102 of file class.ilForum.php.
Referenced by moveThreads().
ilForum::setPageHits | ( | int | $pageHits | ) |
ilForum::updateVisits | ( | int | $ID | ) |
Definition at line 1442 of file class.ilForum.php.
References $query, ilSession\get(), getMDB2DataType(), getMDB2DataValue(), getMDB2Query(), and ilSession\set().
|
private |
Definition at line 38 of file class.ilForum.php.
ilDBInterface ilForum::$db |
Definition at line 52 of file class.ilForum.php.
|
private |
Definition at line 37 of file class.ilForum.php.
Referenced by getDbTable(), and setDbTable().
ilErrorHandling ilForum::$error |
Definition at line 51 of file class.ilForum.php.
|
private |
Definition at line 36 of file class.ilForum.php.
|
private |
Definition at line 47 of file class.ilForum.php.
Referenced by getForumId().
|
private |
Definition at line 49 of file class.ilForum.php.
Referenced by getImportName().
ilLanguage ilForum::$lng |
Definition at line 50 of file class.ilForum.php.
|
private |
Definition at line 41 of file class.ilForum.php.
|
private |
Definition at line 40 of file class.ilForum.php.
|
private |
Definition at line 39 of file class.ilForum.php.
|
staticprotected |
Definition at line 34 of file class.ilForum.php.
|
private |
Definition at line 46 of file class.ilForum.php.
Referenced by getPageHits(), and setPageHits().
|
private |
Definition at line 48 of file class.ilForum.php.
Referenced by getForumRefId().
|
private |
Definition at line 44 of file class.ilForum.php.
|
private |
Definition at line 45 of file class.ilForum.php.
Referenced by prepareText().
ilSetting ilForum::$settings |
Definition at line 54 of file class.ilForum.php.
|
private |
Definition at line 42 of file class.ilForum.php.
|
private |
Definition at line 43 of file class.ilForum.php.
Referenced by prepareText().
ilObjUser ilForum::$user |
Definition at line 53 of file class.ilForum.php.
|
private |
Definition at line 31 of file class.ilForum.php.
|
private |
Definition at line 30 of file class.ilForum.php.
|
private |
Definition at line 29 of file class.ilForum.php.