20use ILIAS\GlobalScreen\Collector\StorageFacade;
64 $this->storage =
$DIC[
'resource_storage'];
76 static $usr_language_key;
77 static $default_language;
80 if (!isset($usr_language_key) &&
$DIC->user()->getId() === 0 ||
$DIC->user()->isAnonymous()) {
81 $usr_language_key =
$DIC->http()->request()->getQueryParams()[
'lang'] ??
false;
84 if (!isset($usr_language_key)) {
85 $usr_language_key =
$DIC->language()->getUserLanguage() ?
$DIC->language()->getUserLanguage() :
$DIC->language()->getDefaultLanguage();
87 if (!isset($default_language)) {
92 ($item->getRefId() > 0) ?
97 if ($item instanceof
hasTitle && isset($this->translations[
"{$item->getProviderIdentification()->serialize()}|$usr_language_key"])
98 && $this->translations[
"{$item->getProviderIdentification()->serialize()}|$usr_language_key"] !==
''
100 $item = $item->
withTitle((
string) $this->translations[
"{$item->getProviderIdentification()->serialize()}|$usr_language_key"]);
129 if (isset($this->items[$serialize][
'active'])) {
130 return $this->items[$serialize][
'active'] ===
'1';
142 if (isset($this->items[$serialized][
'parent_identification'])) {
143 return $DIC->globalScreen()->identification()->fromSerializedIdentification($this->items[$serialized][
'parent_identification']);
146 return $item->getParent();
155 if (isset($this->items[$id][self::ICON_ID]) && strlen($this->items[$id][self::ICON_ID]) > 1) {
158 $ri = $this->storage->manage()->find($this->items[$id][self::ICON_ID]);
164 $src = $this->storage->consume()->src($ri);
170 if ($old_symbol instanceof
Glyph) {
171 $aria_label = $old_symbol->getAriaLabel();
172 } elseif ($old_symbol instanceof
Icon) {
173 $aria_label = $old_symbol->getLabel();
174 } elseif ($item instanceof
hasTitle) {
175 $aria_label = $item->getTitle();
178 $aria_label = empty($aria_label) ? $id : $aria_label;
180 $symbol =
$DIC->ui()->factory()->symbol()->icon()->custom($src->getSrc(), $aria_label);
static getArray($key=null, $values=null)
An exception for terminatinating execution or to throw for unit testing.
Class FileNotFoundException Indicates that a file is missing or not found.
Class Link Attention: This is not the same as the \ILIAS\UI\Component\Link\Link.
static getDefaultLanguage()
static _lookupTitle($a_id)
lookup object title
static _lookupObjectId($a_ref_id)
lookup object id
Interface IdentificationInterface.
customTranslationForUser(hasTitle $item)
Interface hasSymbol Methods for Entries with Symbols.
withSymbol(Symbol $symbol)
getPosition()
Return the default position for installation, this will be overridden by the configuration later.
withPosition(int $position)
getProviderIdentification()
This describes how a glyph could be modified during construction of UI.
This describes how an icon could be modified during construction of UI.