ILIAS
trunk Revision v11.0_alpha-1862-g4e205cb56d4
|
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) | |
getSubPathIdsForNode (ilForumPost $post) | |
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 |
readonly 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 29 of file class.ilForum.php.
ilForum::__construct | ( | ) |
Definition at line 58 of file class.ilForum.php.
References $DIC, ILIAS\Repository\lng(), ILIAS\Repository\settings(), and ILIAS\Repository\user().
|
static |
Definition at line 1069 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 1085 of file class.ilForum.php.
Referenced by ilObjForumGUI\renderDraftContent(), ilObjForumGUI\renderPostContent(), and ilForumExportGUI\renderPostHtml().
|
static |
Definition at line 1646 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 1130 of file class.ilForum.php.
Referenced by getOneThread().
ilForum::convertDate | ( | string | $date | ) |
Definition at line 1125 of file class.ilForum.php.
References ilDatePresentation\formatDate(), and IL_CAL_DATETIME.
ilForum::countActiveUserArticles | ( | int | $a_user_id | ) |
Definition at line 1109 of file class.ilForum.php.
References $res, getForumId(), and ILIAS\Repository\user().
ilForum::countUserArticles | ( | int | $a_user_id | ) |
Definition at line 1094 of file class.ilForum.php.
References $res, and getForumId().
ilForum::deletePost | ( | $postIdOrRecord, | |
bool | $raiseEvents = true |
||
) |
int|array<string,mixed> | $postIdOrRecord |
Definition at line 531 of file class.ilForum.php.
References $post, $res, ilObjForum\_deleteReadEntries(), ilObjMediaObject\_exists(), ilObjMediaObject\_getMobsOfObject(), ilObjMediaObject\_removeUsage(), deletePostFiles(), deletePostTree(), ilNewsItem\getFirstNewsIdForContext(), getForumId(), getForumRefId(), getPostNode(), getSubPathIdsForNode(), and ILIAS\Repository\int().
Referenced by mergeThreads().
|
private |
int[] | $a_ids |
Definition at line 1503 of file class.ilForum.php.
References getForumId().
Referenced by deletePost().
ilForum::deletePostTree | ( | array | $a_node | ) |
Definition at line 1349 of file class.ilForum.php.
References $res, and ILIAS\Repository\int().
Referenced by deletePost().
ilForum::disableForumNotification | ( | int | $user_id | ) |
Definition at line 1579 of file class.ilForum.php.
ilForum::enableForumNotification | ( | int | $user_id | ) |
Definition at line 1524 of file class.ilForum.php.
References $res, $user_id, and isForumNotificationEnabled().
ilForum::fetchPostNodeData | ( | stdClass | $a_row | ) |
Definition at line 1280 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 287 of file class.ilForum.php.
References $message, $notify, 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 |
||
) |
Definition at line 738 of file class.ilForum.php.
References $data, $params, $res, $user_id, getForumId(), ilForumProperties\getInstance(), ILIAS\Repository\int(), and ILIAS\Repository\user().
Referenced by ILIAS\Forum\Thread\ForumThreadTableSessionStorage\__construct().
ilForum::getDbTable | ( | ) |
ilForum::getFirstPostNode | ( | int | $tree_id | ) |
Definition at line 1247 of file class.ilForum.php.
References $res, fetchPostNodeData(), and null.
ilForum::getForumId | ( | ) |
Definition at line 80 of file class.ilForum.php.
References $id.
Referenced by countActiveUserArticles(), countUserArticles(), deletePost(), deletePostFiles(), getAllThreads(), getNumberOfPublishedUserPostings(), getOneThread(), getUserStatistics(), and mergeThreads().
ilForum::getForumRefId | ( | ) |
Definition at line 85 of file class.ilForum.php.
References $ref_id.
Referenced by deletePost(), getModerators(), getOneThread(), and postCensorship().
ilForum::getImportName | ( | ) |
Definition at line 1514 of file class.ilForum.php.
References $import_name.
Referenced by generateThread(), and getOneThread().
ilForum::getMDB2DataType | ( | ) |
Definition at line 123 of file class.ilForum.php.
Referenced by getOneThread(), getOneTopic(), and updateVisits().
ilForum::getMDB2DataValue | ( | ) |
Definition at line 118 of file class.ilForum.php.
Referenced by getOneThread(), getOneTopic(), and updateVisits().
ilForum::getMDB2Query | ( | ) |
Definition at line 113 of file class.ilForum.php.
Referenced by getOneThread(), getOneTopic(), and updateVisits().
ilForum::getModerators | ( | ) |
Definition at line 1061 of file class.ilForum.php.
References getForumRefId().
ilForum::getNumberOfPublishedUserPostings | ( | int | $usr_id, |
bool | $post_activation_required | ||
) |
Definition at line 947 of file class.ilForum.php.
References $res, and getForumId().
ilForum::getOneThread | ( | ) |
Definition at line 167 of file class.ilForum.php.
References $message, $notify, ilRTE\_replaceMediaObjectImageSrc(), addPostTree(), getForumId(), getForumRefId(), getImportName(), ilForumProperties\getInstance(), ilObjectFactory\getInstanceByRefId(), getMDB2DataType(), getMDB2DataValue(), getMDB2Query(), insertPostNode(), NEWS_NOTICE, NEWS_USERS, null, and prepareText().
ilForum::getOneTopic | ( | ) |
Definition at line 143 of file class.ilForum.php.
References $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 1229 of file class.ilForum.php.
References $res.
Referenced by insertPostNode().
ilForum::getPostNode | ( | int | $post_id | ) |
Definition at line 1262 of file class.ilForum.php.
References $res, fetchPostNodeData(), and null.
Referenced by deletePost(), and mergeThreads().
ilForum::getRootPostIdByThread | ( | int | $a_thread_id | ) |
|
static |
Definition at line 1623 of file class.ilForum.php.
References $DIC, $res, and ILIAS\Repository\int().
Referenced by ilObjForumSearchResultTableGUI\parse(), and ilForumExportGUI\printPost().
ilForum::getSubPathIdsForNode | ( | ilForumPost | $post | ) |
Definition at line 1330 of file class.ilForum.php.
References $res, ilForumPost\getLft(), ilForumPost\getRgt(), ilForumPost\getTreeId(), ILIAS\Repository\int(), and ilDBConstants\T_INTEGER.
Referenced by deletePost().
ilForum::getUserStatistics | ( | bool | $post_activation_required | ) |
Definition at line 979 of file class.ilForum.php.
References $data, $res, getForumId(), ILIAS\Repository\int(), 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 1163 of file class.ilForum.php.
References $res, getPostDepth(), and ILIAS\Repository\int().
Referenced by getOneThread().
ilForum::isForumNotificationEnabled | ( | int | $user_id | ) |
Definition at line 1590 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 1658 of file class.ilForum.php.
References $ilDB, deletePost(), getForumId(), getPostNode(), ilObjForum\mergeForumUserRead(), ilForumPost\mergePosts(), ilForumNotification\mergeThreadNotifications(), null, and ilForumPostsTree\updateTargetRootRgt().
ilForum::moveThreads | ( | array | $thread_ids, |
ilObjForum | $src_forum, | ||
int | $target_obj_id | ||
) |
int[] | $thread_ids |
Definition at line 351 of file class.ilForum.php.
References $res, ILIAS\Survey\Mode\getId(), ilObject\getId(), getOneTopic(), ILIAS\Repository\lng(), null, 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 1423 of file class.ilForum.php.
References $replQuote2, $txtQuote2, ilMathJax\getInstance(), and ILIAS\Repository\lng().
Referenced by getOneThread(), postCensorship(), and ilObjForumGUI\renderPostingForm().
ilForum::setDbTable | ( | string | $dbTable | ) |
ilForum::setForumId | ( | int | $a_obj_id | ) |
Definition at line 70 of file class.ilForum.php.
ilForum::setForumRefId | ( | int | $a_ref_id | ) |
Definition at line 75 of file class.ilForum.php.
ilForum::setImportName | ( | string | $a_import_name | ) |
Definition at line 1519 of file class.ilForum.php.
ilForum::setMDB2WhereCondition | ( | string | $query_string, |
array | $data_type, | ||
array | $data_value | ||
) |
Definition at line 104 of file class.ilForum.php.
Referenced by moveThreads().
ilForum::setPageHits | ( | int | $pageHits | ) |
ilForum::updateVisits | ( | int | $ID | ) |
Definition at line 1402 of file class.ilForum.php.
References ilSession\get(), getMDB2DataType(), getMDB2DataValue(), getMDB2Query(), and ilSession\set().
|
private |
Definition at line 40 of file class.ilForum.php.
ilDBInterface ilForum::$db |
Definition at line 54 of file class.ilForum.php.
|
private |
Definition at line 39 of file class.ilForum.php.
Referenced by getDbTable(), and setDbTable().
ilErrorHandling ilForum::$error |
Definition at line 53 of file class.ilForum.php.
|
private |
Definition at line 38 of file class.ilForum.php.
|
private |
Definition at line 49 of file class.ilForum.php.
Referenced by getForumId().
|
private |
Definition at line 51 of file class.ilForum.php.
Referenced by getImportName().
ilLanguage ilForum::$lng |
Definition at line 52 of file class.ilForum.php.
|
private |
Definition at line 43 of file class.ilForum.php.
|
private |
Definition at line 42 of file class.ilForum.php.
|
private |
Definition at line 41 of file class.ilForum.php.
|
staticprotected |
Definition at line 36 of file class.ilForum.php.
|
private |
Definition at line 48 of file class.ilForum.php.
Referenced by getPageHits(), and setPageHits().
|
private |
Definition at line 50 of file class.ilForum.php.
Referenced by getForumRefId().
|
private |
Definition at line 46 of file class.ilForum.php.
|
private |
Definition at line 47 of file class.ilForum.php.
Referenced by prepareText().
ilSetting ilForum::$settings |
Definition at line 56 of file class.ilForum.php.
|
private |
Definition at line 44 of file class.ilForum.php.
|
private |
Definition at line 45 of file class.ilForum.php.
Referenced by prepareText().
ilObjUser ilForum::$user |
Definition at line 55 of file class.ilForum.php.
|
private |
Definition at line 33 of file class.ilForum.php.
|
private |
Definition at line 32 of file class.ilForum.php.
|
private |
Definition at line 31 of file class.ilForum.php.