Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / dashboard / engine / PhabricatorDashboardPortalProfileMenuEngine.php
blob9f8afc74dc4720e97c6e8ac3d79c8598cd6a60b1
1 <?php
3 final class PhabricatorDashboardPortalProfileMenuEngine
4 extends PhabricatorProfileMenuEngine {
6 protected function isMenuEngineConfigurable() {
7 return true;
10 protected function isMenuEnginePersonalizable() {
11 return false;
14 public function getItemURI($path) {
15 $portal = $this->getProfileObject();
17 return $portal->getURI().$path;
20 protected function getBuiltinProfileItems($object) {
21 $items = array();
23 $items[] = $this->newDividerItem('tail');
25 $items[] = $this->newManageItem();
27 $items[] = $this->newItem()
28 ->setMenuItemKey(PhabricatorDashboardPortalMenuItem::MENUITEMKEY)
29 ->setBuiltinKey('manage')
30 ->setIsTailItem(true);
32 return $items;
35 protected function newNoMenuItemsView(array $items) {
36 $object = $this->getProfileObject();
37 $builtins = $this->getBuiltinProfileItems($object);
39 if (count($items) <= count($builtins)) {
40 return $this->newEmptyView(
41 pht('New Portal'),
42 pht('Use "Edit Menu" to add menu items to this portal.'));
43 } else {
44 return $this->newEmptyValue(
45 pht('No Portal Content'),
46 pht(
47 'None of the visible menu items in this portal can render any '.
48 'content.'));