Differential D20358 Diff 48609 src/applications/search/menuitem/PhabricatorMotivatorProfileMenuItem.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/menuitem/PhabricatorMotivatorProfileMenuItem.php
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | final class PhabricatorMotivatorProfileMenuItem | ||||
} | } | ||||
private function getOptions() { | private function getOptions() { | ||||
return array( | return array( | ||||
'catfacts' => pht('Cat Facts'), | 'catfacts' => pht('Cat Facts'), | ||||
); | ); | ||||
} | } | ||||
protected function newNavigationMenuItems( | protected function newMenuItemViewList( | ||||
PhabricatorProfileMenuItemConfiguration $config) { | PhabricatorProfileMenuItemConfiguration $config) { | ||||
$source = $config->getMenuItemProperty('source'); | $source = $config->getMenuItemProperty('source'); | ||||
switch ($source) { | switch ($source) { | ||||
case 'catfacts': | case 'catfacts': | ||||
default: | default: | ||||
$facts = $this->getCatFacts(); | $facts = $this->getCatFacts(); | ||||
$fact_name = pht('Cat Facts'); | $fact_name = pht('Cat Facts'); | ||||
$fact_icon = 'fa-paw'; | $fact_icon = 'fa-paw'; | ||||
break; | break; | ||||
} | } | ||||
$fact_text = $this->selectFact($facts); | $fact_text = $this->selectFact($facts); | ||||
$item = $this->newItem() | $item = $this->newItemView() | ||||
->setName($fact_name) | ->setName($fact_name) | ||||
->setIcon($fact_icon) | ->setIcon($fact_icon) | ||||
->setTooltip($fact_text) | ->setTooltip($fact_text) | ||||
->setHref('#'); | ->setHref('#'); | ||||
return array( | return array( | ||||
$item, | $item, | ||||
); | ); | ||||
▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines |