19 declare(strict_types=1);
51 protected \ilLanguage
$lng;
62 $this->ui_factory = $DIC->ui()->factory();
63 $this->ui_renderer = $DIC->ui()->renderer();
64 $this->
lng = $DIC->language();
69 $component = $this->applyComponentDecorator(
76 return $this->applyTopics($component, $item);
93 $content = $this->ui_factory->legacy()->content(
'...');
94 $name = $item instanceof
hasTitle ? $item->getTitle() :
"-";
95 $slate = $this->ui_factory->mainControls()->slate()->legacy(
116 if ($item instanceof
hasSymbol && $item->hasSymbol()) {
117 $c = $item->getSymbolDecorator();
119 return $this->applySymbolDecorator($item->getSymbol(), $item);
122 return $item->getSymbol();
125 if (function_exists(
'mb_substr')) {
126 $abbr = strtoupper(mb_substr($item->getTitle(), 0, 1));
128 $abbr = strtoupper(substr($item->getTitle(), 0, 1));
131 $abbr = strtoupper(substr(uniqid(
'',
true), -1));
134 return $this->ui_factory->symbol()
142 ->withAbbreviation($abbr);
151 $uri_string = trim($uri_string,
" ");
153 if (str_starts_with($uri_string,
'http')) {
154 $checker = self::getURIChecker();
155 if ($checker($uri_string)) {
156 return new URI($uri_string);
158 return new URI(rtrim(ILIAS_HTTP_PATH,
"/") .
"/" . ltrim(
$_SERVER[
'REQUEST_URI'] ??
'',
"./"));
161 return new URI(rtrim(ILIAS_HTTP_PATH,
"/") .
"/" . ltrim($uri_string,
"./"));
166 return static function (
string $v):
bool {
167 $v = self::getURIConverter()($v);
179 return static function (
string $v):
string {
180 if (str_starts_with($v,
'./')) {
181 $v = ltrim($v,
'./');
182 return ILIAS_HTTP_PATH .
'/' . $v;
MakeSlateAsync::unhash insteadof SlateSessionStateCode
getComponentWithoutContent(isItem $item)
This is called when only the relevant part of the item is needed during the synchronous rendering of ...
trait MakeSlateAsync
Trait MakeSlateAsync.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addOnloadCode(Slate $slate, isItem $item)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
addAsyncLoadingCode(Slate $slate, supportsAsynchronousLoading $item)
getComponentWithContent(isItem $item)
This is called in cases when the Full Item with it's content is needed, e.g.
getURI(string $uri_string)
Interface supportsAsynchronousLoading Types, which implement this interface, can load their content a...
getStandardSymbol(isItem $item)
supportsAsyncContent(isItem $item)
getComponentForItem(isItem $item, bool $with_content=true)
Class TypeRenderer Every Type should have a renderer, if you won't provide on in your TypeInformation...
getProviderIdentification()
__construct()
BaseTypeRenderer constructor.