19declare(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);
172 }
catch (Exception
$e) {
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
static getArray(?string $key=null, $values=null)
Class FileNotFoundException.
Class Link Attention: This is not the same as the \ILIAS\UI\Component\Link\Link.
static getDefaultLanguage()
static _lookupObjectId(int $ref_id)
static _lookupTitle(int $obj_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.