@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
at upstream/main 61 lines 1.9 kB view raw
1<?php 2 3final class PhabricatorProjectProfileMenuEngine 4 extends PhabricatorProfileMenuEngine { 5 6 protected function isMenuEngineConfigurable() { 7 return true; 8 } 9 10 protected function isMenuEnginePersonalizable() { 11 return false; 12 } 13 14 public function getItemURI($path) { 15 $project = $this->getProfileObject(); 16 $id = $project->getID(); 17 return "/project/{$id}/item/{$path}"; 18 } 19 20 protected function getBuiltinProfileItems($object) { 21 $items = array(); 22 23 $items[] = $this->newItem() 24 ->setBuiltinKey(PhabricatorProject::ITEM_PICTURE) 25 ->setMenuItemKey(PhabricatorProjectPictureProfileMenuItem::MENUITEMKEY) 26 ->setIsHeadItem(true); 27 28 $items[] = $this->newItem() 29 ->setBuiltinKey(PhabricatorProject::ITEM_PROFILE) 30 ->setMenuItemKey(PhabricatorProjectDetailsProfileMenuItem::MENUITEMKEY); 31 32 $items[] = $this->newItem() 33 ->setBuiltinKey(PhabricatorProject::ITEM_POINTS) 34 ->setMenuItemKey(PhabricatorProjectPointsProfileMenuItem::MENUITEMKEY); 35 36 $items[] = $this->newItem() 37 ->setBuiltinKey(PhabricatorProject::ITEM_WORKBOARD) 38 ->setMenuItemKey(PhabricatorProjectWorkboardProfileMenuItem::MENUITEMKEY); 39 40 $items[] = $this->newItem() 41 ->setBuiltinKey(PhabricatorProject::ITEM_REPORTS) 42 ->setMenuItemKey(PhabricatorProjectReportsProfileMenuItem::MENUITEMKEY); 43 44 $items[] = $this->newItem() 45 ->setBuiltinKey(PhabricatorProject::ITEM_MEMBERS) 46 ->setMenuItemKey(PhabricatorProjectMembersProfileMenuItem::MENUITEMKEY); 47 48 $items[] = $this->newItem() 49 ->setBuiltinKey(PhabricatorProject::ITEM_SUBPROJECTS) 50 ->setMenuItemKey( 51 PhabricatorProjectSubprojectsProfileMenuItem::MENUITEMKEY); 52 53 $items[] = $this->newItem() 54 ->setBuiltinKey(PhabricatorProject::ITEM_MANAGE) 55 ->setMenuItemKey(PhabricatorProjectManageProfileMenuItem::MENUITEMKEY) 56 ->setIsTailItem(true); 57 58 return $items; 59 } 60 61}