Differential D25167 Diff 605 src/applications/people/menuitem/PhabricatorPeopleBadgesProfileMenuItem.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/menuitem/PhabricatorPeopleBadgesProfileMenuItem.php
Show All 16 Lines | public function canHideMenuItem( | ||||
PhabricatorProfileMenuItemConfiguration $config) { | PhabricatorProfileMenuItemConfiguration $config) { | ||||
return true; | return true; | ||||
} | } | ||||
public function getDisplayName( | public function getDisplayName( | ||||
PhabricatorProfileMenuItemConfiguration $config) { | PhabricatorProfileMenuItemConfiguration $config) { | ||||
$name = $config->getMenuItemProperty('name'); | $name = $config->getMenuItemProperty('name'); | ||||
if (strlen($name)) { | if (phutil_nonempty_string($name)) { | ||||
valerio.bozzolan: ✅ I was not able to test any other value than `null` locally for `$name`. I also think it's… | |||||
return $name; | return $name; | ||||
} | } | ||||
return $this->getDefaultName(); | return $this->getDefaultName(); | ||||
} | } | ||||
public function buildEditEngineFields( | public function buildEditEngineFields( | ||||
PhabricatorProfileMenuItemConfiguration $config) { | PhabricatorProfileMenuItemConfiguration $config) { | ||||
Show All 26 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
✅ I was not able to test any other value than null locally for $name. I also think it's probably not possible to change the name of this menu. Probably this is a uncompleted feature, like the home menu. In any case it's safe to assume that $name will be a string, when populated.
The phutil_nonempty_string() will report alien types, and that is OK.