19 declare(strict_types=1);
    51         $this->
ctrl->setParameter($this->parent_obj, 
'thr_pk', $this->thread->getId());
    54         $this->max_entries = $frm->getPageHits();
    61         return $this->root_node->getId();
    66         return $this->authorInformation[(
int) $node[
'pos_pk']] ?? ($this->authorInformation[(
int) $node[
'pos_pk']] = 
new ilForumAuthorInformation(
    67             (
int) ($node[
'pos_author_id'] ?? 0),
    68             (
int) $node[
'pos_display_user_id'],
    69             (
string) $node[
'pos_usr_alias'],
    70             (
string) $node[
'import_name']
    76         if ($this->preloaded) {
    77             return $this->preloaded_children[$a_parent_node_id] ?? [];
    80         return $this->thread->getNestedSetPostChildren($a_parent_node_id, 1);
    85         $this->preloaded_children = [];
    87         $children = $this->thread->getNestedSetPostChildren($this->root_node->getId());
    89         array_walk($children, 
function ($node, 
$key): 
void {
    90             if (!array_key_exists((
int) $node[
'pos_pk'], $this->preloaded_children)) {
    91                 $this->preloaded_children[(
int) $node[
'pos_pk']] = [];
    94             $this->preloaded_children[(
int) $node[
'parent_pos']][$node[
'pos_pk']] = $node;
    97         $this->preloaded = 
true;
   107         return $this->
lng->txt(
"frm_posts");
   114                 'pos_pk' => $this->root_node->getId(),
   115                 'pos_subject' => $this->root_node->getSubject(),
   116                 'pos_author_id' => $this->root_node->getPosAuthorId(),
   117                 'pos_display_user_id' => $this->root_node->getDisplayUserId(),
   118                 'pos_usr_alias' => $this->root_node->getUserAlias(),
   119                 'pos_date' => $this->root_node->getCreateDate(),
   120                 'import_name' => $this->root_node->getImportName(),
   121                 'post_read' => $this->root_node->isPostRead()
   125         return $this->
ui->factory()->tree()
   127             ->withData($rootNode)
   128             ->withHighlightOnNodeClick(
false);
   138         if ($nodeIconPath !== 
'') {
   146         if ((
int) $record[
'pos_pk'] === $this->root_node->getId()) {
   151             $bylineString = $authorInfo->getAuthorShortName() . 
', ' . $creationDate;
   153             $node = $factory->bylined($this->
getNodeContent($record), $bylineString, $icon);
   162             ilRepositoryGUI::class,
   163             ilObjForumGUI::class,
   169         return (isset($a_node[
'pos_pk']) ? (
int) $a_node[
'pos_pk'] : 0);
   187         $this->
ctrl->setParameter($this->parent_obj, 
'backurl', null);
   189         if (isset($a_node[
'counter']) && $a_node[
'counter'] > 0) {
   191             $this->
ctrl->setParameter($this->parent_obj, 
'page', $page);
   194         if (isset($a_node[
'post_read']) && $a_node[
'post_read']) {
   195             $this->
ctrl->setParameter($this->parent_obj, 
'pos_pk', null);
   196             $url = $this->
ctrl->getLinkTarget($this->parent_obj, $this->parent_cmd, (
string) $a_node[
'pos_pk']);
   198             $this->
ctrl->setParameter($this->parent_obj, 
'pos_pk', $a_node[
'pos_pk']);
   199             $url = $this->
ctrl->getLinkTarget($this->parent_obj, 
'markPostRead', (
string) $a_node[
'pos_pk']);
   200             $this->
ctrl->setParameter($this->parent_obj, 
'pos_pk', null);
   203         $this->
ctrl->setParameter($this->parent_obj, 
'page', null);
   210         return $a_node[
'pos_subject'];
 getNodeStateToggleCmdClasses($record)
 
setSkipRootNode(bool $a_val)
 
Class Forum core functions for forum. 
 
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item. 
 
createNode(\ILIAS\UI\Component\Tree\Node\Factory $factory, $record)
 
Class ilForumExplorerGUI. 
 
Class ChatMainBarProvider . 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
 
setNodeOpen($a_id)
Set node to be opened (additional custom opened node, not standard expand behaviour) ...
 
getChildsOfNode($a_parent_node_id)
 
getNodeIconAlt($a_node)
Get node icon alt attribute. 
 
setPreloadChilds(bool $a_val)
 
getChildren($record, $environment=null)
Get a list of records (that list can also be empty). 
 
getAuthorInformationByNode(array $node)
 
This describes a Tree Control. 
 
Explorer class that works on tree objects (Services/Tree) 
 
__construct(string $a_expl_id, object $a_parent_obj, string $a_parent_cmd, private ilForumTopic $thread, private ilForumPost $root_node)
 
array $preloaded_children