22        $factory = $this->dic->ui()->factory();
 
   23        $request = $this->dic->http()->request();
 
   24        $languages = $this->dic->language()->getInstalledLanguages();
 
   27            return $this->
if->identifier($id);
 
   30        $txt = 
function (
string $id) : 
string {
 
   31            return $this->dic->language()->txt($id);
 
   37        if ($ref_id = $request->getQueryParams()[
'ref_id']) {
 
   39            if (
$type != 
"root") {  
 
   42        } elseif ($target = $request->getQueryParams()[
'target']) {
 
   43            $target_str = 
'target=' . $target . 
'&';
 
   46        $login_glyph = 
$factory->symbol()->glyph()->login();
 
   47        $login = $this->meta_bar->topLinkItem(
$if(
'login'))
 
   48            ->withAction(
"login.php?" . $target_str . 
"client_id=" . rawurlencode(CLIENT_ID) . 
"&cmd=force_login&lang=" . $this->dic->user()->getCurrentLanguage())
 
   49            ->withSymbol($login_glyph)
 
   51            ->withTitle(
$txt(
'log_in'))
 
   52            ->withAvailableCallable(
function () {
 
   55            ->withVisibilityCallable(
function () {
 
   60        $language_selection = $this->meta_bar->topParentItem(
$if(
'language_selection'))
 
   63            ->withAvailableCallable(
function () {
 
   66            ->withVisibilityCallable(
function () use ($languages) {
 
   67                return count($languages) > 1;
 
   69            ->withTitle(
$txt(
'language'));
 
   76        foreach ($languages as $lang_key) {
 
   78            $language_name = $this->dic->language()->_lookupEntry($lang_key, 
"meta", 
"meta_l_" . $lang_key);
 
   80            $language_icon = 
$factory->symbol()->icon()->standard(
"none", $language_name)
 
   81                                     ->withAbbreviation($lang_key);
 
   83            $s = $this->meta_bar->linkItem(
$if($lang_key))
 
   84                ->withSymbol($language_icon)
 
   86                ->withTitle($language_name);
 
   88            $language_selection->appendChild($s);
 
  100        return (!$this->dic->user()->isAnonymous() && $this->dic->user()->getId() != 0);
 
  106        $b = preg_match(
"%^.*/login.php$%", 
$_SERVER[
"SCRIPT_NAME"]) === 1;
 
  114        $url = (is_int(strpos($existing_url, 
"?")))
 
  115            ? $existing_url . 
"&" . $addition
 
  116            : $existing_url . 
"?" . $addition;
 
  118        $url = str_replace(
"?&", 
"?", 
$url);
 
  128        return preg_replace(
"/&*lang=[a-z]{2}&*/", 
"", 
$base);
 
An exception for terminatinating execution or to throw for unit testing.
static _lookupType($a_id, $a_reference=false)
lookup object type
Interface IdentificationInterface.
withSymbol(Symbol $symbol)
@inheritDoc