59 static $usr_language_key;
60 static $default_language;
63 if (!isset($usr_language_key) && $DIC->user()->getId() === 0 || $DIC->user()->isAnonymous()) {
64 $usr_language_key = $DIC->http()->request()->getQueryParams()[
'lang'] ??
false;
67 if (!isset($usr_language_key)) {
68 $usr_language_key = $DIC->language()->getUserLanguage() ? $DIC->language()->getUserLanguage() : $DIC->language()->getDefaultLanguage();
70 if (!isset($default_language)) {
74 $item = $item->
withTitle(($item->getRefId() > 0) ?
79 if ($item instanceof
hasTitle && isset($this->translations[
"{$item->getProviderIdentification()->serialize()}|$usr_language_key"])
80 && $this->translations[
"{$item->getProviderIdentification()->serialize()}|$usr_language_key"] !==
'' 82 $item = $item->
withTitle((
string) $this->translations[
"{$item->getProviderIdentification()->serialize()}|$usr_language_key"]);
111 if (isset($this->items[$serialize][
'active'])) {
112 return $this->items[$serialize][
'active'] ===
'1';
124 if (isset($this->items[$parent_string][
'parent_identification'])) {
125 return $DIC->globalScreen()->identification()->fromSerializedIdentification($this->items[$parent_string][
'parent_identification']);
137 if (isset($this->items[$id][self::ICON_ID]) && strlen($this->items[$id][self::ICON_ID]) > 1) {
140 $ri = $this->storage->find($this->items[$id][self::ICON_ID]);
144 $stream = $this->storage->stream($ri)->getStream();
145 $data =
'data:' . $this->storage->getRevision($ri)->getInformation()->getMimeType() .
';base64,' . base64_encode($stream->getContents());
147 if ($old_symbol instanceof
Glyph || $old_symbol instanceof
Icon) {
148 $aria_label = $old_symbol->getAriaLabel();
149 } elseif ($item instanceof
hasTitle) {
150 $aria_label = $item->getTitle();
152 $aria_label =
'Custom icon';
155 $symbol = $DIC->ui()->factory()->symbol()->icon()->custom(
$data, $aria_label);
static getDefaultLanguage()
static _lookupTitle($a_id)
This describes how a icon could be modified during construction of UI.
Interface IdentificationInterface.
static _lookupObjectId($a_ref_id)
Class Link Attention: This is not the same as the .
getProviderIdentification()
This describes how a glyph could be modified during construction of UI.
getPosition()
Return the default position for installation, this will be overridden by the configuration later...
Interface hasSymbol Methods for Entries with Symbols.
withPosition(int $position)
static getArray($key=null, $values=null)
withSymbol(Symbol $symbol)
Class ilAsqQuestionAuthoringFactory.
customTranslationForUser(hasTitle $item)