19 declare(strict_types=1);
    35         $factory = $this->dic->ui()->factory();
    36         $request = $this->dic->http()->request();
    37         $languages = $this->dic->language()->getInstalledLanguages();
    39         $if = 
function (
string $id): IdentificationInterface {
    40             return $this->
if->identifier(
$id);
    43         $txt = 
function (
string $id): 
string {
    44             return $this->dic->language()->txt(
$id);
    50         if (isset($request->getQueryParams()[
'ref_id']) && 
$ref_id = $request->getQueryParams()[
'ref_id']) {
    52             if ($type !== 
'root') {  
    55         } elseif (isset($request->getQueryParams()[
'target']) && $target = $request->getQueryParams()[
'target']) {
    56             $target = rawurlencode($target);        
    57             $target_str = 
'target=' . $target . 
'&';
    60         $login_glyph = $factory->symbol()->glyph()->login();
    62         $current_language = $this->dic->user()->getCurrentLanguage() ?: $this->dic->language()->getLangKey();
    64         $login = $this->meta_bar
    65             ->topLinkItem($if(
'login'))
    67                 'login.php?' . $target_str . 
'client_id=' . rawurlencode(
    69                 ) . 
'&cmd=force_login&lang=' . $current_language
    71             ->withSymbol($login_glyph)
    73             ->withTitle(
$txt(
'log_in'))
    74             ->withAvailableCallable(
function () {
    82         $language_selection = $this->meta_bar
    83             ->topParentItem($if(
'language_selection'))
    84             ->withSymbol($factory->symbol()->glyph()->language())
    86             ->withAvailableCallable(
function () {
    90                 return \count($languages) > 1;
    97         foreach ($languages as $lang_key) {
    99             $language_name = $this->dic->language()->_lookupEntry($lang_key, 
'meta', 
'meta_l_' . $lang_key);
   101             $language_icon = $factory
   104                 ->standard(
'none', $language_name)
   105                 ->withAbbreviation($lang_key);
   108                 ->linkItem($if($lang_key))
   109                 ->withSymbol($language_icon)
   111                 ->withContentLanguage($dataFactory->languageTag($lang_key))
   115             $language_selection->appendChild($s);
   126         return (!$this->dic->user()->isAnonymous() && $this->dic->user()->getId() !== 0);
   131         return preg_match(
'%^.*(?:/login\.php|/)$%', $uri->getPath()) === 1;
   136         $url = (\is_int(strpos($existing_url, 
'?')))
   137             ? $existing_url . 
'&' . $addition
   138             : $existing_url . 
'?' . $addition;
   140         $url = str_replace(
'?&', 
'?', 
$url);
   147         $base = substr($uri->__toString(), strrpos($uri->__toString(), 
'/') + 1);
   149         return rtrim(preg_replace(
'/([&?])lang=[a-z]{2}([&$])/', 
'$1', $base), 
'?&');
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
withVisibilityCallable(callable $is_visible)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
static _lookupType(int $id, bool $reference=false)