Differential D21863 Diff 52118 src/applications/people/menuitem/PhabricatorPeopleDetailsProfileMenuItem.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/menuitem/PhabricatorPeopleDetailsProfileMenuItem.php
Show All 9 Lines | final class PhabricatorPeopleDetailsProfileMenuItem | ||||
} | } | ||||
private function getDefaultName() { | private function getDefaultName() { | ||||
return pht('User Details'); | return pht('User Details'); | ||||
} | } | ||||
public function getDisplayName( | public function getDisplayName( | ||||
PhabricatorProfileMenuItemConfiguration $config) { | PhabricatorProfileMenuItemConfiguration $config) { | ||||
$name = $config->getMenuItemProperty('name'); | $default = $this->getDefaultName(); | ||||
return $this->getNameFromConfig($config, $default); | |||||
if (strlen($name)) { | |||||
return $name; | |||||
} | |||||
return $this->getDefaultName(); | |||||
} | } | ||||
public function buildEditEngineFields( | public function buildEditEngineFields( | ||||
PhabricatorProfileMenuItemConfiguration $config) { | PhabricatorProfileMenuItemConfiguration $config) { | ||||
return array( | return array( | ||||
id(new PhabricatorTextEditField()) | id(new PhabricatorTextEditField()) | ||||
->setKey('name') | ->setKey('name') | ||||
->setLabel(pht('Name')) | ->setLabel(pht('Name')) | ||||
Show All 24 Lines |