ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjLinkResourceSubItemListGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
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 $this->tpl->parseCurrentBlock();
74 }
75
76 $this->showDetailsLink();
77 return $this->tpl->get();
78 }
79}
ILIAS Setting Class.
Base class for all sub item list gui's.
getSubItemIds(bool $limited=false)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26