Differential D20358 Diff 48609 src/applications/search/menuitem/PhabricatorManageProfileMenuItem.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/menuitem/PhabricatorManageProfileMenuItem.php
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 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) { | ||||
$viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
if (!$viewer->isLoggedIn()) { | if (!$viewer->isLoggedIn()) { | ||||
return array(); | return array(); | ||||
} | } | ||||
$engine = $this->getEngine(); | $engine = $this->getEngine(); | ||||
$href = $engine->getItemURI('configure/'); | $uri = $engine->getItemURI('configure/'); | ||||
$name = $this->getDisplayName($config); | $name = $this->getDisplayName($config); | ||||
$icon = 'fa-pencil'; | $icon = 'fa-pencil'; | ||||
$item = $this->newItem() | $item = $this->newItemView() | ||||
->setHref($href) | ->setURI($uri) | ||||
->setName($name) | ->setName($name) | ||||
->setIcon($icon); | ->setIcon($icon); | ||||
return array( | return array( | ||||
$item, | $item, | ||||
); | ); | ||||
} | } | ||||
} | } |