Differential D20358 Diff 48609 src/applications/people/menuitem/PhabricatorPeopleBadgesProfileMenuItem.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/menuitem/PhabricatorPeopleBadgesProfileMenuItem.php
Show All 34 Lines | return array( | ||||
id(new PhabricatorTextEditField()) | id(new PhabricatorTextEditField()) | ||||
->setKey('name') | ->setKey('name') | ||||
->setLabel(pht('Name')) | ->setLabel(pht('Name')) | ||||
->setPlaceholder($this->getDefaultName()) | ->setPlaceholder($this->getDefaultName()) | ||||
->setValue($config->getMenuItemProperty('name')), | ->setValue($config->getMenuItemProperty('name')), | ||||
); | ); | ||||
} | } | ||||
protected function newNavigationMenuItems( | protected function newMenuItemViewList( | ||||
PhabricatorProfileMenuItemConfiguration $config) { | PhabricatorProfileMenuItemConfiguration $config) { | ||||
$user = $config->getProfileObject(); | $user = $config->getProfileObject(); | ||||
$id = $user->getID(); | $id = $user->getID(); | ||||
$item = $this->newItem() | $item = $this->newItemView() | ||||
->setHref("/people/badges/{$id}/") | ->setURI("/people/badges/{$id}/") | ||||
->setName($this->getDisplayName($config)) | ->setName($this->getDisplayName($config)) | ||||
->setIcon('fa-trophy'); | ->setIcon('fa-trophy'); | ||||
return array( | return array( | ||||
$item, | $item, | ||||
); | ); | ||||
} | } | ||||
} | } |