public function getTitle() { $use_glyph = true; $request = $this->getRequest(); if ($request) { $user = $request->getUser(); if ($user && $user->loadPreferences()->getPreference(PhabricatorUserPreferences::PREFERENCE_TITLES) !== 'glyph') { $use_glyph = false; } } $title = parent::getTitle(); $prefix = null; if ($use_glyph) { $prefix = $this->getGlyph(); } else { $application_name = $this->getApplicationName(); if (strlen($application_name)) { $prefix = '[' . $application_name . ']'; } } if (strlen($prefix)) { $title = $prefix . ' ' . $title; } return $title; }
public function getTitle() { $glyph_key = PhabricatorTitleGlyphsSetting::SETTINGKEY; $glyph_on = PhabricatorTitleGlyphsSetting::VALUE_TITLE_GLYPHS; $glyph_setting = $this->getUserPreference($glyph_key, $glyph_on); $use_glyph = $glyph_setting == $glyph_on; $title = parent::getTitle(); $prefix = null; if ($use_glyph) { $prefix = $this->getGlyph(); } else { $application_name = $this->getApplicationName(); if (strlen($application_name)) { $prefix = '[' . $application_name . ']'; } } if (strlen($prefix)) { $title = $prefix . ' ' . $title; } return $title; }
public function getTitle() { $glyph_key = PhabricatorUserPreferences::PREFERENCE_TITLES; if ($this->getUserPreference($glyph_key) == 'text') { $use_glyph = false; } else { $use_glyph = true; } $title = parent::getTitle(); $prefix = null; if ($use_glyph) { $prefix = $this->getGlyph(); } else { $application_name = $this->getApplicationName(); if (strlen($application_name)) { $prefix = '[' . $application_name . ']'; } } if (strlen($prefix)) { $title = $prefix . ' ' . $title; } return $title; }