ILIAS  release_8 Revision v8.24
class.ilObjLinkResourceSubItemListGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
26{
29
30 public function __construct(string $cmd_class)
31 {
32 global $DIC;
34 $this->settings = $DIC->settings();
35 }
36
37 public function getHTML(): string
38 {
39 $this->lng->loadLanguageModule('webr');
40 $this->web_link_repo = new ilWebLinkDatabaseRepository($this->getObjId());
41 foreach ($this->getSubItemIds(true) as $sub_item) {
42 try {
43 $item = $this->web_link_repo->getItemByLinkId($sub_item);
45 // ignore indexed but not existent weblink
46 continue;
47 }
48 if (is_object($this->getHighlighter()) && strlen(
49 $this->getHighlighter()->getContent(
50 $this->getObjId(),
51 $sub_item
52 )
53 )) {
54 $this->tpl->setCurrentBlock('sea_fragment');
55 $this->tpl->setVariable(
56 'TXT_FRAGMENT',
57 $this->getHighlighter()->getContent(
58 $this->getObjId(),
59 $sub_item
60 )
61 );
62 $this->tpl->parseCurrentBlock();
63 }
64 $this->tpl->setCurrentBlock('subitem');
65 $this->tpl->setVariable('SUBITEM_TYPE', $this->lng->txt('webr'));
66 $this->tpl->setVariable('SEPERATOR', ':');
67 $this->tpl->setVariable(
68 'LINK',
69 $item->getResolvedLink((bool) $this->settings->get('links_dynamic'))
70 );
71 $this->tpl->setVariable('TARGET', '_blank');
72 $this->tpl->setVariable('TITLE', $item->getTitle());
73
74 if (count($this->getSubItemIds(true)) > 1) {
75 $this->parseRelevance($sub_item);
76 }
77 $this->tpl->parseCurrentBlock();
78 }
79
80 $this->showDetailsLink();
81 return $this->tpl->get();
82 }
83}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getSubItemIds(bool $limited=false)
parseRelevance(int $sub_item)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc