Changeset View
Changeset View
Standalone View
Standalone View
src/applications/home/menuitem/PhabricatorHomeProfileMenuItem.php
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | return array( | ||||
->setValue($config->getMenuItemProperty('name')), | ->setValue($config->getMenuItemProperty('name')), | ||||
); | ); | ||||
} | } | ||||
protected function newNavigationMenuItems( | protected function newNavigationMenuItems( | ||||
PhabricatorProfileMenuItemConfiguration $config) { | PhabricatorProfileMenuItemConfiguration $config) { | ||||
$viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
if (!$viewer->isLoggedIn()) { | |||||
return array(); | |||||
} | |||||
$name = $this->getDisplayName($config); | $name = $this->getDisplayName($config); | ||||
$icon = 'fa-home'; | $icon = 'fa-home'; | ||||
$href = $this->getItemViewURI($config); | $href = $this->getItemViewURI($config); | ||||
$item = $this->newItem() | $item = $this->newItem() | ||||
->setHref($href) | ->setHref($href) | ||||
->setName($name) | ->setName($name) | ||||
->setIcon($icon); | ->setIcon($icon); | ||||
return array( | return array( | ||||
$item, | $item, | ||||
); | ); | ||||
} | } | ||||
} | } |