19 declare(strict_types=1);
53 $this->storage = $DIC[
'resource_storage'];
65 static $usr_language_key;
66 static $default_language;
69 if (!isset($usr_language_key) && ($DIC->user()->getId() === 0 || $DIC->user()->isAnonymous())) {
70 $usr_language_key = $DIC->http()->wrapper()->query()->has(
'lang')
71 ? $DIC->http()->wrapper()->query()->retrieve(
'lang', $DIC->refinery()->to()->string())
75 if (!isset($usr_language_key)) {
76 $usr_language_key = $DIC->language()->getUserLanguage() ? $DIC->language()->getUserLanguage() : $DIC->language()->getDefaultLanguage();
78 if (!isset($default_language)) {
83 ($item->getRefId() > 0) ?
88 if ($item instanceof
hasTitle && isset($this->translations[
"{$item->getProviderIdentification()->serialize()}|$usr_language_key"])
89 && $this->translations[
"{$item->getProviderIdentification()->serialize()}|$usr_language_key"] !==
'' 91 $item = $item->
withTitle((
string) $this->translations[
"{$item->getProviderIdentification()->serialize()}|$usr_language_key"]);
120 if (isset($this->items[$serialize][
'active'])) {
121 return $this->items[$serialize][
'active'] ===
'1';
133 if (isset($this->items[$serialized][
'parent_identification'])) {
134 return $DIC->globalScreen()->identification()->fromSerializedIdentification($this->items[$serialized][
'parent_identification']);
137 return $item->getParent();
146 if (isset($this->items[
$id][self::ICON_ID]) && strlen($this->items[
$id][self::ICON_ID]) > 1) {
149 $ri = $this->storage->manage()->find($this->items[
$id][self::ICON_ID]);
155 $src = $this->storage->consume()->src($ri);
161 if ($old_symbol instanceof
Glyph) {
162 $aria_label = $old_symbol->getAriaLabel();
163 } elseif ($old_symbol instanceof
Icon) {
164 $aria_label = $old_symbol->getLabel();
165 } elseif ($item instanceof
hasTitle) {
166 $aria_label = $item->getTitle();
169 $aria_label = empty($aria_label) ?
$id : $aria_label;
171 $symbol = $DIC->ui()->factory()->symbol()->icon()->custom($src->getSrc(), $aria_label);
static getDefaultLanguage()
static getArray(?string $key=null, $values=null)
This describes how an icon could be modified during construction of UI.
Interface IdentificationInterface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class Link Attention: This is not the same as the .
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupTitle(int $obj_id)
static _lookupObjectId(int $ref_id)
Interface hasSymbol Methods for Entries with Symbols.
withPosition(int $position)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Class FileNotFoundException.
getProviderIdentification()
withSymbol(Symbol $symbol)
customTranslationForUser(hasTitle $item)