Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / settings / setting / PhabricatorPronounSetting.php
blob51425f3cfde820430aadf326ad300b53081f9c2d
1 <?php
3 final class PhabricatorPronounSetting
4 extends PhabricatorSelectSetting {
6 const SETTINGKEY = 'pronoun';
8 public function getSettingName() {
9 return pht('Pronoun');
12 public function getSettingPanelKey() {
13 return PhabricatorLanguageSettingsPanel::PANELKEY;
16 protected function getSettingOrder() {
17 return 200;
20 protected function getControlInstructions() {
21 return pht('Choose the pronoun you prefer.');
24 public function getSettingDefaultValue() {
25 return PhutilPerson::GENDER_UNKNOWN;
28 protected function getSelectOptions() {
29 // TODO: When editing another user's settings as an administrator, this
30 // is not the best username: the user's username would be better.
32 $viewer = $this->getViewer();
33 $username = $viewer->getUsername();
35 $label_unknown = pht('%s updated their profile', $username);
36 $label_her = pht('%s updated her profile', $username);
37 $label_his = pht('%s updated his profile', $username);
39 return array(
40 PhutilPerson::GENDER_UNKNOWN => $label_unknown,
41 PhutilPerson::GENDER_MASCULINE => $label_his,
42 PhutilPerson::GENDER_FEMININE => $label_her,