Differential D17209 Diff 41403 src/applications/favorites/engine/PhabricatorFavoritesProfileMenuEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/favorites/engine/PhabricatorFavoritesProfileMenuEngine.php
| Show All 15 Lines | protected function getItemURI($path) { | ||||
| } else { | } else { | ||||
| return "/favorites/global/item/{$path}"; | return "/favorites/global/item/{$path}"; | ||||
| } | } | ||||
| } | } | ||||
| protected function getBuiltinProfileItems($object) { | protected function getBuiltinProfileItems($object) { | ||||
| $items = array(); | $items = array(); | ||||
| $custom_phid = $this->getCustomPHID(); | $custom_phid = $this->getCustomPHID(); | ||||
| $viewer = $this->getViewer(); | |||||
| // Built-in Global Defaults | // Built-in Global Defaults | ||||
| if (!$custom_phid) { | if (!$custom_phid) { | ||||
| $create_task = array( | $create_task = array( | ||||
| 'name' => null, | 'name' => null, | ||||
| 'formKey' => | 'formKey' => | ||||
| id(new ManiphestEditEngine())->getProfileMenuItemDefault(), | id(new ManiphestEditEngine())->getProfileMenuItemDefault(), | ||||
| ); | ); | ||||
| Show All 21 Lines | if (!$custom_phid) { | ||||
| ->setMenuItemProperties($create_project); | ->setMenuItemProperties($create_project); | ||||
| $items[] = $this->newItem() | $items[] = $this->newItem() | ||||
| ->setBuiltinKey(PhabricatorFavoritesConstants::ITEM_REPOSITORY) | ->setBuiltinKey(PhabricatorFavoritesConstants::ITEM_REPOSITORY) | ||||
| ->setMenuItemKey(PhabricatorEditEngineProfileMenuItem::MENUITEMKEY) | ->setMenuItemKey(PhabricatorEditEngineProfileMenuItem::MENUITEMKEY) | ||||
| ->setMenuItemProperties($create_repository); | ->setMenuItemProperties($create_repository); | ||||
| } | } | ||||
| // Single Manage Item, switches URI based on admin/user | |||||
| $items[] = $this->newItem() | |||||
| ->setBuiltinKey(PhabricatorFavoritesConstants::ITEM_MANAGE) | |||||
| ->setMenuItemKey( | |||||
| PhabricatorFavoritesManageProfileMenuItem::MENUITEMKEY); | |||||
| return $items; | return $items; | ||||
| } | } | ||||
| } | } | ||||
epriestley: This should only be part of the global menu, I think. Currently, you get an item on each of… | |||||
This should only be part of the global menu, I think. Currently, you get an item on each of "Edit Personal" and "Edit Global".
Once you load global + personal you'll get two items, I believe.