Page MenuHomePhabricator

D17028.diff
No OneTemporary

D17028.diff

diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -1787,7 +1787,7 @@
'PhabricatorApplicationEmailCommandsController' => 'applications/meta/controller/PhabricatorApplicationEmailCommandsController.php',
'PhabricatorApplicationLaunchView' => 'applications/meta/view/PhabricatorApplicationLaunchView.php',
'PhabricatorApplicationPanelController' => 'applications/meta/controller/PhabricatorApplicationPanelController.php',
- 'PhabricatorApplicationProfilePanel' => 'applications/search/profilepanel/PhabricatorApplicationProfilePanel.php',
+ 'PhabricatorApplicationProfileMenuItem' => 'applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php',
'PhabricatorApplicationQuery' => 'applications/meta/query/PhabricatorApplicationQuery.php',
'PhabricatorApplicationSearchController' => 'applications/search/controller/PhabricatorApplicationSearchController.php',
'PhabricatorApplicationSearchEngine' => 'applications/search/engine/PhabricatorApplicationSearchEngine.php',
@@ -2505,7 +2505,7 @@
'PhabricatorDisabledUserController' => 'applications/auth/controller/PhabricatorDisabledUserController.php',
'PhabricatorDisplayPreferencesSettingsPanel' => 'applications/settings/panel/PhabricatorDisplayPreferencesSettingsPanel.php',
'PhabricatorDisqusAuthProvider' => 'applications/auth/provider/PhabricatorDisqusAuthProvider.php',
- 'PhabricatorDividerProfilePanel' => 'applications/search/profilepanel/PhabricatorDividerProfilePanel.php',
+ 'PhabricatorDividerProfileMenuItem' => 'applications/search/menuitem/PhabricatorDividerProfileMenuItem.php',
'PhabricatorDivinerApplication' => 'applications/diviner/application/PhabricatorDivinerApplication.php',
'PhabricatorDoorkeeperApplication' => 'applications/doorkeeper/application/PhabricatorDoorkeeperApplication.php',
'PhabricatorDraft' => 'applications/draft/storage/PhabricatorDraft.php',
@@ -2828,7 +2828,7 @@
'PhabricatorLegalpadDocumentPHIDType' => 'applications/legalpad/phid/PhabricatorLegalpadDocumentPHIDType.php',
'PhabricatorLegalpadSignaturePolicyRule' => 'applications/legalpad/policyrule/PhabricatorLegalpadSignaturePolicyRule.php',
'PhabricatorLibraryTestCase' => '__tests__/PhabricatorLibraryTestCase.php',
- 'PhabricatorLinkProfilePanel' => 'applications/search/profilepanel/PhabricatorLinkProfilePanel.php',
+ 'PhabricatorLinkProfileMenuItem' => 'applications/search/menuitem/PhabricatorLinkProfileMenuItem.php',
'PhabricatorLipsumArtist' => 'applications/lipsum/image/PhabricatorLipsumArtist.php',
'PhabricatorLipsumContentSource' => 'infrastructure/contentsource/PhabricatorLipsumContentSource.php',
'PhabricatorLipsumGenerateWorkflow' => 'applications/lipsum/management/PhabricatorLipsumGenerateWorkflow.php',
@@ -2966,7 +2966,7 @@
'PhabricatorModularTransactionType' => 'applications/transactions/storage/PhabricatorModularTransactionType.php',
'PhabricatorMonospacedFontSetting' => 'applications/settings/setting/PhabricatorMonospacedFontSetting.php',
'PhabricatorMonospacedTextareasSetting' => 'applications/settings/setting/PhabricatorMonospacedTextareasSetting.php',
- 'PhabricatorMotivatorProfilePanel' => 'applications/search/profilepanel/PhabricatorMotivatorProfilePanel.php',
+ 'PhabricatorMotivatorProfileMenuItem' => 'applications/search/menuitem/PhabricatorMotivatorProfileMenuItem.php',
'PhabricatorMultiColumnUIExample' => 'applications/uiexample/examples/PhabricatorMultiColumnUIExample.php',
'PhabricatorMultiFactorSettingsPanel' => 'applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php',
'PhabricatorMultimeterApplication' => 'applications/multimeter/application/PhabricatorMultimeterApplication.php',
@@ -3244,7 +3244,7 @@
'PhabricatorPeopleCreateGuidanceContext' => 'applications/people/guidance/PhabricatorPeopleCreateGuidanceContext.php',
'PhabricatorPeopleDatasource' => 'applications/people/typeahead/PhabricatorPeopleDatasource.php',
'PhabricatorPeopleDeleteController' => 'applications/people/controller/PhabricatorPeopleDeleteController.php',
- 'PhabricatorPeopleDetailsProfilePanel' => 'applications/people/profilepanel/PhabricatorPeopleDetailsProfilePanel.php',
+ 'PhabricatorPeopleDetailsProfileMenuItem' => 'applications/people/menuitem/PhabricatorPeopleDetailsProfileMenuItem.php',
'PhabricatorPeopleDisableController' => 'applications/people/controller/PhabricatorPeopleDisableController.php',
'PhabricatorPeopleEmpowerController' => 'applications/people/controller/PhabricatorPeopleEmpowerController.php',
'PhabricatorPeopleExternalPHIDType' => 'applications/people/phid/PhabricatorPeopleExternalPHIDType.php',
@@ -3258,7 +3258,7 @@
'PhabricatorPeopleLogSearchEngine' => 'applications/people/query/PhabricatorPeopleLogSearchEngine.php',
'PhabricatorPeopleLogsController' => 'applications/people/controller/PhabricatorPeopleLogsController.php',
'PhabricatorPeopleMainMenuBarExtension' => 'applications/people/extension/PhabricatorPeopleMainMenuBarExtension.php',
- 'PhabricatorPeopleManageProfilePanel' => 'applications/people/profilepanel/PhabricatorPeopleManageProfilePanel.php',
+ 'PhabricatorPeopleManageProfileMenuItem' => 'applications/people/menuitem/PhabricatorPeopleManageProfileMenuItem.php',
'PhabricatorPeopleNewController' => 'applications/people/controller/PhabricatorPeopleNewController.php',
'PhabricatorPeopleNoOwnerDatasource' => 'applications/people/typeahead/PhabricatorPeopleNoOwnerDatasource.php',
'PhabricatorPeopleOwnerDatasource' => 'applications/people/typeahead/PhabricatorPeopleOwnerDatasource.php',
@@ -3367,13 +3367,13 @@
'PhabricatorProfileMenuEditEngine' => 'applications/search/editor/PhabricatorProfileMenuEditEngine.php',
'PhabricatorProfileMenuEditor' => 'applications/search/editor/PhabricatorProfileMenuEditor.php',
'PhabricatorProfileMenuEngine' => 'applications/search/engine/PhabricatorProfileMenuEngine.php',
+ 'PhabricatorProfileMenuItem' => 'applications/search/menuitem/PhabricatorProfileMenuItem.php',
'PhabricatorProfileMenuItemConfiguration' => 'applications/search/storage/PhabricatorProfileMenuItemConfiguration.php',
'PhabricatorProfileMenuItemConfigurationQuery' => 'applications/search/query/PhabricatorProfileMenuItemConfigurationQuery.php',
'PhabricatorProfileMenuItemConfigurationTransaction' => 'applications/search/storage/PhabricatorProfileMenuItemConfigurationTransaction.php',
'PhabricatorProfileMenuItemConfigurationTransactionQuery' => 'applications/search/query/PhabricatorProfileMenuItemConfigurationTransactionQuery.php',
+ 'PhabricatorProfileMenuItemIconSet' => 'applications/search/menuitem/PhabricatorProfileMenuItemIconSet.php',
'PhabricatorProfileMenuItemPHIDType' => 'applications/search/phidtype/PhabricatorProfileMenuItemPHIDType.php',
- 'PhabricatorProfilePanel' => 'applications/search/profilepanel/PhabricatorProfilePanel.php',
- 'PhabricatorProfilePanelIconSet' => 'applications/search/profilepanel/PhabricatorProfilePanelIconSet.php',
'PhabricatorProject' => 'applications/project/storage/PhabricatorProject.php',
'PhabricatorProjectAddHeraldAction' => 'applications/project/herald/PhabricatorProjectAddHeraldAction.php',
'PhabricatorProjectApplication' => 'applications/project/application/PhabricatorProjectApplication.php',
@@ -3411,7 +3411,7 @@
'PhabricatorProjectDatasource' => 'applications/project/typeahead/PhabricatorProjectDatasource.php',
'PhabricatorProjectDefaultController' => 'applications/project/controller/PhabricatorProjectDefaultController.php',
'PhabricatorProjectDescriptionField' => 'applications/project/customfield/PhabricatorProjectDescriptionField.php',
- 'PhabricatorProjectDetailsProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectDetailsProfilePanel.php',
+ 'PhabricatorProjectDetailsProfileMenuItem' => 'applications/project/menuitem/PhabricatorProjectDetailsProfileMenuItem.php',
'PhabricatorProjectEditController' => 'applications/project/controller/PhabricatorProjectEditController.php',
'PhabricatorProjectEditEngine' => 'applications/project/engine/PhabricatorProjectEditEngine.php',
'PhabricatorProjectEditPictureController' => 'applications/project/controller/PhabricatorProjectEditPictureController.php',
@@ -3432,16 +3432,17 @@
'PhabricatorProjectLogicalUserDatasource' => 'applications/project/typeahead/PhabricatorProjectLogicalUserDatasource.php',
'PhabricatorProjectLogicalViewerDatasource' => 'applications/project/typeahead/PhabricatorProjectLogicalViewerDatasource.php',
'PhabricatorProjectManageController' => 'applications/project/controller/PhabricatorProjectManageController.php',
- 'PhabricatorProjectManageProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectManageProfilePanel.php',
+ 'PhabricatorProjectManageProfileMenuItem' => 'applications/project/menuitem/PhabricatorProjectManageProfileMenuItem.php',
'PhabricatorProjectMaterializedMemberEdgeType' => 'applications/project/edge/PhabricatorProjectMaterializedMemberEdgeType.php',
'PhabricatorProjectMemberListView' => 'applications/project/view/PhabricatorProjectMemberListView.php',
'PhabricatorProjectMemberOfProjectEdgeType' => 'applications/project/edge/PhabricatorProjectMemberOfProjectEdgeType.php',
'PhabricatorProjectMembersAddController' => 'applications/project/controller/PhabricatorProjectMembersAddController.php',
'PhabricatorProjectMembersDatasource' => 'applications/project/typeahead/PhabricatorProjectMembersDatasource.php',
'PhabricatorProjectMembersPolicyRule' => 'applications/project/policyrule/PhabricatorProjectMembersPolicyRule.php',
- 'PhabricatorProjectMembersProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectMembersProfilePanel.php',
+ 'PhabricatorProjectMembersProfileMenuItem' => 'applications/project/menuitem/PhabricatorProjectMembersProfileMenuItem.php',
'PhabricatorProjectMembersRemoveController' => 'applications/project/controller/PhabricatorProjectMembersRemoveController.php',
'PhabricatorProjectMembersViewController' => 'applications/project/controller/PhabricatorProjectMembersViewController.php',
+ 'PhabricatorProjectMenuItemController' => 'applications/project/controller/PhabricatorProjectMenuItemController.php',
'PhabricatorProjectMoveController' => 'applications/project/controller/PhabricatorProjectMoveController.php',
'PhabricatorProjectNameContextFreeGrammar' => 'applications/project/lipsum/PhabricatorProjectNameContextFreeGrammar.php',
'PhabricatorProjectNoProjectsDatasource' => 'applications/project/typeahead/PhabricatorProjectNoProjectsDatasource.php',
@@ -3449,8 +3450,7 @@
'PhabricatorProjectOrUserDatasource' => 'applications/project/typeahead/PhabricatorProjectOrUserDatasource.php',
'PhabricatorProjectOrUserFunctionDatasource' => 'applications/project/typeahead/PhabricatorProjectOrUserFunctionDatasource.php',
'PhabricatorProjectPHIDResolver' => 'applications/phid/resolver/PhabricatorProjectPHIDResolver.php',
- 'PhabricatorProjectPanelController' => 'applications/project/controller/PhabricatorProjectPanelController.php',
- 'PhabricatorProjectPointsProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectPointsProfilePanel.php',
+ 'PhabricatorProjectPointsProfileMenuItem' => 'applications/project/menuitem/PhabricatorProjectPointsProfileMenuItem.php',
'PhabricatorProjectProfileController' => 'applications/project/controller/PhabricatorProjectProfileController.php',
'PhabricatorProjectProfileMenuEngine' => 'applications/project/engine/PhabricatorProjectProfileMenuEngine.php',
'PhabricatorProjectProjectHasMemberEdgeType' => 'applications/project/edge/PhabricatorProjectProjectHasMemberEdgeType.php',
@@ -3468,7 +3468,7 @@
'PhabricatorProjectStatus' => 'applications/project/constants/PhabricatorProjectStatus.php',
'PhabricatorProjectSubprojectWarningController' => 'applications/project/controller/PhabricatorProjectSubprojectWarningController.php',
'PhabricatorProjectSubprojectsController' => 'applications/project/controller/PhabricatorProjectSubprojectsController.php',
- 'PhabricatorProjectSubprojectsProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectSubprojectsProfilePanel.php',
+ 'PhabricatorProjectSubprojectsProfileMenuItem' => 'applications/project/menuitem/PhabricatorProjectSubprojectsProfileMenuItem.php',
'PhabricatorProjectTestDataGenerator' => 'applications/project/lipsum/PhabricatorProjectTestDataGenerator.php',
'PhabricatorProjectTransaction' => 'applications/project/storage/PhabricatorProjectTransaction.php',
'PhabricatorProjectTransactionEditor' => 'applications/project/editor/PhabricatorProjectTransactionEditor.php',
@@ -3481,7 +3481,7 @@
'PhabricatorProjectWatchController' => 'applications/project/controller/PhabricatorProjectWatchController.php',
'PhabricatorProjectWatcherListView' => 'applications/project/view/PhabricatorProjectWatcherListView.php',
'PhabricatorProjectWorkboardBackgroundColor' => 'applications/project/constants/PhabricatorProjectWorkboardBackgroundColor.php',
- 'PhabricatorProjectWorkboardProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectWorkboardProfilePanel.php',
+ 'PhabricatorProjectWorkboardProfileMenuItem' => 'applications/project/menuitem/PhabricatorProjectWorkboardProfileMenuItem.php',
'PhabricatorProjectsCurtainExtension' => 'applications/project/engineextension/PhabricatorProjectsCurtainExtension.php',
'PhabricatorProjectsEditEngineExtension' => 'applications/project/engineextension/PhabricatorProjectsEditEngineExtension.php',
'PhabricatorProjectsEditField' => 'applications/transactions/editfield/PhabricatorProjectsEditField.php',
@@ -6610,7 +6610,7 @@
'PhabricatorApplicationEmailCommandsController' => 'PhabricatorApplicationsController',
'PhabricatorApplicationLaunchView' => 'AphrontTagView',
'PhabricatorApplicationPanelController' => 'PhabricatorApplicationsController',
- 'PhabricatorApplicationProfilePanel' => 'PhabricatorProfilePanel',
+ 'PhabricatorApplicationProfileMenuItem' => 'PhabricatorProfileMenuItem',
'PhabricatorApplicationQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'PhabricatorApplicationSearchController' => 'PhabricatorSearchBaseController',
'PhabricatorApplicationSearchEngine' => 'Phobject',
@@ -7452,7 +7452,7 @@
'PhabricatorDisabledUserController' => 'PhabricatorAuthController',
'PhabricatorDisplayPreferencesSettingsPanel' => 'PhabricatorEditEngineSettingsPanel',
'PhabricatorDisqusAuthProvider' => 'PhabricatorOAuth2AuthProvider',
- 'PhabricatorDividerProfilePanel' => 'PhabricatorProfilePanel',
+ 'PhabricatorDividerProfileMenuItem' => 'PhabricatorProfileMenuItem',
'PhabricatorDivinerApplication' => 'PhabricatorApplication',
'PhabricatorDoorkeeperApplication' => 'PhabricatorApplication',
'PhabricatorDraft' => 'PhabricatorDraftDAO',
@@ -7820,7 +7820,7 @@
'PhabricatorLegalpadDocumentPHIDType' => 'PhabricatorPHIDType',
'PhabricatorLegalpadSignaturePolicyRule' => 'PhabricatorPolicyRule',
'PhabricatorLibraryTestCase' => 'PhutilLibraryTestCase',
- 'PhabricatorLinkProfilePanel' => 'PhabricatorProfilePanel',
+ 'PhabricatorLinkProfileMenuItem' => 'PhabricatorProfileMenuItem',
'PhabricatorLipsumArtist' => 'Phobject',
'PhabricatorLipsumContentSource' => 'PhabricatorContentSource',
'PhabricatorLipsumGenerateWorkflow' => 'PhabricatorLipsumManagementWorkflow',
@@ -7968,7 +7968,7 @@
'PhabricatorModularTransactionType' => 'Phobject',
'PhabricatorMonospacedFontSetting' => 'PhabricatorStringSetting',
'PhabricatorMonospacedTextareasSetting' => 'PhabricatorSelectSetting',
- 'PhabricatorMotivatorProfilePanel' => 'PhabricatorProfilePanel',
+ 'PhabricatorMotivatorProfileMenuItem' => 'PhabricatorProfileMenuItem',
'PhabricatorMultiColumnUIExample' => 'PhabricatorUIExample',
'PhabricatorMultiFactorSettingsPanel' => 'PhabricatorSettingsPanel',
'PhabricatorMultimeterApplication' => 'PhabricatorApplication',
@@ -8310,7 +8310,7 @@
'PhabricatorPeopleCreateGuidanceContext' => 'PhabricatorGuidanceContext',
'PhabricatorPeopleDatasource' => 'PhabricatorTypeaheadDatasource',
'PhabricatorPeopleDeleteController' => 'PhabricatorPeopleController',
- 'PhabricatorPeopleDetailsProfilePanel' => 'PhabricatorProfilePanel',
+ 'PhabricatorPeopleDetailsProfileMenuItem' => 'PhabricatorProfileMenuItem',
'PhabricatorPeopleDisableController' => 'PhabricatorPeopleController',
'PhabricatorPeopleEmpowerController' => 'PhabricatorPeopleController',
'PhabricatorPeopleExternalPHIDType' => 'PhabricatorPHIDType',
@@ -8324,7 +8324,7 @@
'PhabricatorPeopleLogSearchEngine' => 'PhabricatorApplicationSearchEngine',
'PhabricatorPeopleLogsController' => 'PhabricatorPeopleController',
'PhabricatorPeopleMainMenuBarExtension' => 'PhabricatorMainMenuBarExtension',
- 'PhabricatorPeopleManageProfilePanel' => 'PhabricatorProfilePanel',
+ 'PhabricatorPeopleManageProfileMenuItem' => 'PhabricatorProfileMenuItem',
'PhabricatorPeopleNewController' => 'PhabricatorPeopleController',
'PhabricatorPeopleNoOwnerDatasource' => 'PhabricatorTypeaheadDatasource',
'PhabricatorPeopleOwnerDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
@@ -8453,6 +8453,7 @@
'PhabricatorProfileMenuEditEngine' => 'PhabricatorEditEngine',
'PhabricatorProfileMenuEditor' => 'PhabricatorApplicationTransactionEditor',
'PhabricatorProfileMenuEngine' => 'Phobject',
+ 'PhabricatorProfileMenuItem' => 'Phobject',
'PhabricatorProfileMenuItemConfiguration' => array(
'PhabricatorSearchDAO',
'PhabricatorPolicyInterface',
@@ -8462,9 +8463,8 @@
'PhabricatorProfileMenuItemConfigurationQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'PhabricatorProfileMenuItemConfigurationTransaction' => 'PhabricatorApplicationTransaction',
'PhabricatorProfileMenuItemConfigurationTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
+ 'PhabricatorProfileMenuItemIconSet' => 'PhabricatorIconSet',
'PhabricatorProfileMenuItemPHIDType' => 'PhabricatorPHIDType',
- 'PhabricatorProfilePanel' => 'Phobject',
- 'PhabricatorProfilePanelIconSet' => 'PhabricatorIconSet',
'PhabricatorProject' => array(
'PhabricatorProjectDAO',
'PhabricatorApplicationTransactionInterface',
@@ -8525,7 +8525,7 @@
'PhabricatorProjectDatasource' => 'PhabricatorTypeaheadDatasource',
'PhabricatorProjectDefaultController' => 'PhabricatorProjectBoardController',
'PhabricatorProjectDescriptionField' => 'PhabricatorProjectStandardCustomField',
- 'PhabricatorProjectDetailsProfilePanel' => 'PhabricatorProfilePanel',
+ 'PhabricatorProjectDetailsProfileMenuItem' => 'PhabricatorProfileMenuItem',
'PhabricatorProjectEditController' => 'PhabricatorProjectController',
'PhabricatorProjectEditEngine' => 'PhabricatorEditEngine',
'PhabricatorProjectEditPictureController' => 'PhabricatorProjectController',
@@ -8545,16 +8545,17 @@
'PhabricatorProjectLogicalUserDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
'PhabricatorProjectLogicalViewerDatasource' => 'PhabricatorTypeaheadDatasource',
'PhabricatorProjectManageController' => 'PhabricatorProjectController',
- 'PhabricatorProjectManageProfilePanel' => 'PhabricatorProfilePanel',
+ 'PhabricatorProjectManageProfileMenuItem' => 'PhabricatorProfileMenuItem',
'PhabricatorProjectMaterializedMemberEdgeType' => 'PhabricatorEdgeType',
'PhabricatorProjectMemberListView' => 'PhabricatorProjectUserListView',
'PhabricatorProjectMemberOfProjectEdgeType' => 'PhabricatorEdgeType',
'PhabricatorProjectMembersAddController' => 'PhabricatorProjectController',
'PhabricatorProjectMembersDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
'PhabricatorProjectMembersPolicyRule' => 'PhabricatorPolicyRule',
- 'PhabricatorProjectMembersProfilePanel' => 'PhabricatorProfilePanel',
+ 'PhabricatorProjectMembersProfileMenuItem' => 'PhabricatorProfileMenuItem',
'PhabricatorProjectMembersRemoveController' => 'PhabricatorProjectController',
'PhabricatorProjectMembersViewController' => 'PhabricatorProjectController',
+ 'PhabricatorProjectMenuItemController' => 'PhabricatorProjectController',
'PhabricatorProjectMoveController' => 'PhabricatorProjectController',
'PhabricatorProjectNameContextFreeGrammar' => 'PhutilContextFreeGrammar',
'PhabricatorProjectNoProjectsDatasource' => 'PhabricatorTypeaheadDatasource',
@@ -8562,8 +8563,7 @@
'PhabricatorProjectOrUserDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
'PhabricatorProjectOrUserFunctionDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
'PhabricatorProjectPHIDResolver' => 'PhabricatorPHIDResolver',
- 'PhabricatorProjectPanelController' => 'PhabricatorProjectController',
- 'PhabricatorProjectPointsProfilePanel' => 'PhabricatorProfilePanel',
+ 'PhabricatorProjectPointsProfileMenuItem' => 'PhabricatorProfileMenuItem',
'PhabricatorProjectProfileController' => 'PhabricatorProjectController',
'PhabricatorProjectProfileMenuEngine' => 'PhabricatorProfileMenuEngine',
'PhabricatorProjectProjectHasMemberEdgeType' => 'PhabricatorEdgeType',
@@ -8584,7 +8584,7 @@
'PhabricatorProjectStatus' => 'Phobject',
'PhabricatorProjectSubprojectWarningController' => 'PhabricatorProjectController',
'PhabricatorProjectSubprojectsController' => 'PhabricatorProjectController',
- 'PhabricatorProjectSubprojectsProfilePanel' => 'PhabricatorProfilePanel',
+ 'PhabricatorProjectSubprojectsProfileMenuItem' => 'PhabricatorProfileMenuItem',
'PhabricatorProjectTestDataGenerator' => 'PhabricatorTestDataGenerator',
'PhabricatorProjectTransaction' => 'PhabricatorApplicationTransaction',
'PhabricatorProjectTransactionEditor' => 'PhabricatorApplicationTransactionEditor',
@@ -8597,7 +8597,7 @@
'PhabricatorProjectWatchController' => 'PhabricatorProjectController',
'PhabricatorProjectWatcherListView' => 'PhabricatorProjectUserListView',
'PhabricatorProjectWorkboardBackgroundColor' => 'Phobject',
- 'PhabricatorProjectWorkboardProfilePanel' => 'PhabricatorProfilePanel',
+ 'PhabricatorProjectWorkboardProfileMenuItem' => 'PhabricatorProfileMenuItem',
'PhabricatorProjectsCurtainExtension' => 'PHUICurtainExtension',
'PhabricatorProjectsEditEngineExtension' => 'PhabricatorEditEngineExtension',
'PhabricatorProjectsEditField' => 'PhabricatorTokenizerEditField',
diff --git a/src/applications/base/PhabricatorApplication.php b/src/applications/base/PhabricatorApplication.php
--- a/src/applications/base/PhabricatorApplication.php
+++ b/src/applications/base/PhabricatorApplication.php
@@ -627,18 +627,18 @@
return $base.'(?:query/(?P<queryKey>[^/]+)/)?';
}
- protected function getPanelRouting($controller) {
+ protected function getProfileMenuRouting($controller) {
$edit_route = $this->getEditRoutePattern();
return array(
- '(?P<panelAction>view)/(?P<panelID>[^/]+)/' => $controller,
- '(?P<panelAction>hide)/(?P<panelID>[^/]+)/' => $controller,
- '(?P<panelAction>default)/(?P<panelID>[^/]+)/' => $controller,
- '(?P<panelAction>configure)/' => $controller,
- '(?P<panelAction>reorder)/' => $controller,
- '(?P<panelAction>edit)/'.$edit_route => $controller,
- '(?P<panelAction>new)/(?<panelKey>[^/]+)/'.$edit_route => $controller,
- '(?P<panelAction>builtin)/(?<panelID>[^/]+)/'.$edit_route
+ '(?P<itemAction>view)/(?P<itemID>[^/]+)/' => $controller,
+ '(?P<itemAction>hide)/(?P<itemID>[^/]+)/' => $controller,
+ '(?P<itemAction>default)/(?P<itemID>[^/]+)/' => $controller,
+ '(?P<itemAction>configure)/' => $controller,
+ '(?P<itemAction>reorder)/' => $controller,
+ '(?P<itemAction>edit)/'.$edit_route => $controller,
+ '(?P<itemAction>new)/(?<itemKey>[^/]+)/'.$edit_route => $controller,
+ '(?P<itemAction>builtin)/(?<itemID>[^/]+)/'.$edit_route
=> $controller,
);
}
diff --git a/src/applications/people/application/PhabricatorPeopleApplication.php b/src/applications/people/application/PhabricatorPeopleApplication.php
--- a/src/applications/people/application/PhabricatorPeopleApplication.php
+++ b/src/applications/people/application/PhabricatorPeopleApplication.php
@@ -71,8 +71,8 @@
),
'/p/(?P<username>[\w._-]+)/' => array(
'' => 'PhabricatorPeopleProfileViewController',
- 'panel/'
- => $this->getPanelRouting('PhabricatorPeopleProfilePanelController'),
+ 'item/' => $this->getProfileMenuRouting(
+ 'PhabricatorPeopleProfileMenuController'),
),
);
}
diff --git a/src/applications/people/controller/PhabricatorPeopleProfileEditController.php b/src/applications/people/controller/PhabricatorPeopleProfileEditController.php
--- a/src/applications/people/controller/PhabricatorPeopleProfileEditController.php
+++ b/src/applications/people/controller/PhabricatorPeopleProfileEditController.php
@@ -85,7 +85,7 @@
$crumbs->setBorder(true);
$nav = $this->getProfileMenu();
- $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::PANEL_MANAGE);
+ $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::ITEM_MANAGE);
$header = id(new PHUIHeaderView())
->setHeader(pht('Edit Profile: %s', $user->getFullName()))
diff --git a/src/applications/people/controller/PhabricatorPeopleProfileManageController.php b/src/applications/people/controller/PhabricatorPeopleProfileManageController.php
--- a/src/applications/people/controller/PhabricatorPeopleProfileManageController.php
+++ b/src/applications/people/controller/PhabricatorPeopleProfileManageController.php
@@ -43,7 +43,7 @@
$name = $user->getUsername();
$nav = $this->getProfileMenu();
- $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::PANEL_MANAGE);
+ $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::ITEM_MANAGE);
$timeline = $this->buildTransactionTimeline(
$user,
diff --git a/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php b/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php
--- a/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php
+++ b/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php
@@ -256,7 +256,7 @@
$crumbs->setBorder(true);
$nav = $this->getProfileMenu();
- $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::PANEL_MANAGE);
+ $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::ITEM_MANAGE);
$header = id(new PHUIHeaderView())
->setHeader(pht('Edit Profile Picture'))
diff --git a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php
--- a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php
+++ b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php
@@ -78,7 +78,7 @@
));
$nav = $this->getProfileMenu();
- $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::PANEL_PROFILE);
+ $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::ITEM_PROFILE);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->setBorder(true);
diff --git a/src/applications/people/engine/PhabricatorPeopleProfileMenuEngine.php b/src/applications/people/engine/PhabricatorPeopleProfileMenuEngine.php
--- a/src/applications/people/engine/PhabricatorPeopleProfileMenuEngine.php
+++ b/src/applications/people/engine/PhabricatorPeopleProfileMenuEngine.php
@@ -3,28 +3,28 @@
final class PhabricatorPeopleProfileMenuEngine
extends PhabricatorProfileMenuEngine {
- const PANEL_PROFILE = 'people.profile';
- const PANEL_MANAGE = 'people.manage';
+ const ITEM_PROFILE = 'people.profile';
+ const ITEM_MANAGE = 'people.manage';
protected function isMenuEngineConfigurable() {
return false;
}
- protected function getPanelURI($path) {
+ protected function getItemURI($path) {
$user = $this->getProfileObject();
$username = $user->getUsername();
$username = phutil_escape_uri($username);
- return "/p/{$username}/panel/{$path}";
+ return "/p/{$username}/item/{$path}";
}
- protected function getBuiltinProfilePanels($object) {
+ protected function getBuiltinProfileItems($object) {
$viewer = $this->getViewer();
- $panels = array();
+ $items = array();
- $panels[] = $this->newPanel()
- ->setBuiltinKey(self::PANEL_PROFILE)
- ->setMenuItemKey(PhabricatorPeopleDetailsProfilePanel::PANELKEY);
+ $items[] = $this->newItem()
+ ->setBuiltinKey(self::ITEM_PROFILE)
+ ->setMenuItemKey(PhabricatorPeopleDetailsProfileMenuItem::MENUITEMKEY);
$have_maniphest = PhabricatorApplication::isClassInstalledForViewer(
'PhabricatorManiphestApplication',
@@ -34,9 +34,9 @@
'/maniphest/?statuses=open()&assigned=%s#R',
$object->getPHID());
- $panels[] = $this->newPanel()
+ $items[] = $this->newItem()
->setBuiltinKey('tasks')
- ->setMenuItemKey(PhabricatorLinkProfilePanel::PANELKEY)
+ ->setMenuItemKey(PhabricatorLinkProfileMenuItem::MENUITEMKEY)
->setMenuItemProperty('icon', 'maniphest')
->setMenuItemProperty('name', pht('Open Tasks'))
->setMenuItemProperty('uri', $uri);
@@ -50,9 +50,9 @@
'/differential/?authors=%s#R',
$object->getPHID());
- $panels[] = $this->newPanel()
+ $items[] = $this->newItem()
->setBuiltinKey('revisions')
- ->setMenuItemKey(PhabricatorLinkProfilePanel::PANELKEY)
+ ->setMenuItemKey(PhabricatorLinkProfileMenuItem::MENUITEMKEY)
->setMenuItemProperty('icon', 'differential')
->setMenuItemProperty('name', pht('Revisions'))
->setMenuItemProperty('uri', $uri);
@@ -66,19 +66,19 @@
'/audit/?authors=%s#R',
$object->getPHID());
- $panels[] = $this->newPanel()
+ $items[] = $this->newItem()
->setBuiltinKey('commits')
- ->setMenuItemKey(PhabricatorLinkProfilePanel::PANELKEY)
+ ->setMenuItemKey(PhabricatorLinkProfileMenuItem::MENUITEMKEY)
->setMenuItemProperty('icon', 'diffusion')
->setMenuItemProperty('name', pht('Commits'))
->setMenuItemProperty('uri', $uri);
}
- $panels[] = $this->newPanel()
- ->setBuiltinKey(self::PANEL_MANAGE)
- ->setMenuItemKey(PhabricatorPeopleManageProfilePanel::PANELKEY);
+ $items[] = $this->newItem()
+ ->setBuiltinKey(self::ITEM_MANAGE)
+ ->setMenuItemKey(PhabricatorPeopleManageProfileMenuItem::MENUITEMKEY);
- return $panels;
+ return $items;
}
}
diff --git a/src/applications/people/profilepanel/PhabricatorPeopleDetailsProfilePanel.php b/src/applications/people/menuitem/PhabricatorPeopleDetailsProfileMenuItem.php
rename from src/applications/people/profilepanel/PhabricatorPeopleDetailsProfilePanel.php
rename to src/applications/people/menuitem/PhabricatorPeopleDetailsProfileMenuItem.php
--- a/src/applications/people/profilepanel/PhabricatorPeopleDetailsProfilePanel.php
+++ b/src/applications/people/menuitem/PhabricatorPeopleDetailsProfileMenuItem.php
@@ -1,11 +1,11 @@
<?php
-final class PhabricatorPeopleDetailsProfilePanel
- extends PhabricatorProfilePanel {
+final class PhabricatorPeopleDetailsProfileMenuItem
+ extends PhabricatorProfileMenuItem {
- const PANELKEY = 'people.details';
+ const MENUITEMKEY = 'people.details';
- public function getPanelTypeName() {
+ public function getMenuItemTypeName() {
return pht('User Details');
}
diff --git a/src/applications/people/profilepanel/PhabricatorPeopleManageProfilePanel.php b/src/applications/people/menuitem/PhabricatorPeopleManageProfileMenuItem.php
rename from src/applications/people/profilepanel/PhabricatorPeopleManageProfilePanel.php
rename to src/applications/people/menuitem/PhabricatorPeopleManageProfileMenuItem.php
--- a/src/applications/people/profilepanel/PhabricatorPeopleManageProfilePanel.php
+++ b/src/applications/people/menuitem/PhabricatorPeopleManageProfileMenuItem.php
@@ -1,11 +1,11 @@
<?php
-final class PhabricatorPeopleManageProfilePanel
- extends PhabricatorProfilePanel {
+final class PhabricatorPeopleManageProfileMenuItem
+ extends PhabricatorProfileMenuItem {
- const PANELKEY = 'people.manage';
+ const MENUITEMKEY = 'people.manage';
- public function getPanelTypeName() {
+ public function getMenuItemTypeName() {
return pht('Manage User');
}
@@ -13,7 +13,7 @@
return pht('Manage');
}
- public function canHidePanel(
+ public function canHideMenuItem(
PhabricatorProfileMenuItemConfiguration $config) {
return false;
}
diff --git a/src/applications/project/application/PhabricatorProjectApplication.php b/src/applications/project/application/PhabricatorProjectApplication.php
--- a/src/applications/project/application/PhabricatorProjectApplication.php
+++ b/src/applications/project/application/PhabricatorProjectApplication.php
@@ -61,8 +61,8 @@
=> 'PhabricatorProjectEditPictureController',
$this->getEditRoutePattern('edit/')
=> 'PhabricatorProjectEditController',
- '(?P<projectID>[1-9]\d*)/panel/'
- => $this->getPanelRouting('PhabricatorProjectPanelController'),
+ '(?P<projectID>[1-9]\d*)/item/' => $this->getProfileMenuRouting(
+ 'PhabricatorProjectMenuItemController'),
'subprojects/(?P<id>[1-9]\d*)/'
=> 'PhabricatorProjectSubprojectsController',
'board/(?P<id>[1-9]\d*)/'.
diff --git a/src/applications/project/controller/PhabricatorProjectBoardController.php b/src/applications/project/controller/PhabricatorProjectBoardController.php
--- a/src/applications/project/controller/PhabricatorProjectBoardController.php
+++ b/src/applications/project/controller/PhabricatorProjectBoardController.php
@@ -6,7 +6,7 @@
protected function getProfileMenu() {
$menu = parent::getProfileMenu();
- $menu->selectFilter(PhabricatorProject::PANEL_WORKBOARD);
+ $menu->selectFilter(PhabricatorProject::ITEM_WORKBOARD);
$menu->addClass('project-board-nav');
return $menu;
diff --git a/src/applications/project/controller/PhabricatorProjectBoardViewController.php b/src/applications/project/controller/PhabricatorProjectBoardViewController.php
--- a/src/applications/project/controller/PhabricatorProjectBoardViewController.php
+++ b/src/applications/project/controller/PhabricatorProjectBoardViewController.php
@@ -170,7 +170,7 @@
}
$nav = $this->getProfileMenu();
- $nav->selectFilter(PhabricatorProject::PANEL_WORKBOARD);
+ $nav->selectFilter(PhabricatorProject::ITEM_WORKBOARD);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Workboard'));
@@ -936,7 +936,7 @@
if ($set_default) {
$this
->getProfileMenuEngine()
- ->adjustDefault(PhabricatorProject::PANEL_WORKBOARD);
+ ->adjustDefault(PhabricatorProject::ITEM_WORKBOARD);
}
if ($request->isFormPost()) {
diff --git a/src/applications/project/controller/PhabricatorProjectEditPictureController.php b/src/applications/project/controller/PhabricatorProjectEditPictureController.php
--- a/src/applications/project/controller/PhabricatorProjectEditPictureController.php
+++ b/src/applications/project/controller/PhabricatorProjectEditPictureController.php
@@ -255,7 +255,7 @@
->setForm($upload_form);
$nav = $this->getProfileMenu();
- $nav->selectFilter(PhabricatorProject::PANEL_MANAGE);
+ $nav->selectFilter(PhabricatorProject::ITEM_MANAGE);
return $this->newPage()
->setTitle($title)
diff --git a/src/applications/project/controller/PhabricatorProjectManageController.php b/src/applications/project/controller/PhabricatorProjectManageController.php
--- a/src/applications/project/controller/PhabricatorProjectManageController.php
+++ b/src/applications/project/controller/PhabricatorProjectManageController.php
@@ -39,7 +39,7 @@
$timeline->setShouldTerminate(true);
$nav = $this->getProfileMenu();
- $nav->selectFilter(PhabricatorProject::PANEL_MANAGE);
+ $nav->selectFilter(PhabricatorProject::ITEM_MANAGE);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Manage'));
@@ -91,7 +91,7 @@
id(new PhabricatorActionView())
->setName(pht('Edit Menu'))
->setIcon('fa-th-list')
- ->setHref($this->getApplicationURI("{$id}/panel/configure/"))
+ ->setHref($this->getApplicationURI("{$id}/item/configure/"))
->setDisabled(!$can_edit)
->setWorkflow(!$can_edit));
diff --git a/src/applications/project/controller/PhabricatorProjectMembersViewController.php b/src/applications/project/controller/PhabricatorProjectMembersViewController.php
--- a/src/applications/project/controller/PhabricatorProjectMembersViewController.php
+++ b/src/applications/project/controller/PhabricatorProjectMembersViewController.php
@@ -42,7 +42,7 @@
->setUserPHIDs($project->getWatcherPHIDs());
$nav = $this->getProfileMenu();
- $nav->selectFilter(PhabricatorProject::PANEL_MEMBERS);
+ $nav->selectFilter(PhabricatorProject::ITEM_MEMBERS);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Members'));
diff --git a/src/applications/project/controller/PhabricatorProjectPanelController.php b/src/applications/project/controller/PhabricatorProjectMenuItemController.php
rename from src/applications/project/controller/PhabricatorProjectPanelController.php
rename to src/applications/project/controller/PhabricatorProjectMenuItemController.php
--- a/src/applications/project/controller/PhabricatorProjectPanelController.php
+++ b/src/applications/project/controller/PhabricatorProjectMenuItemController.php
@@ -1,6 +1,6 @@
<?php
-final class PhabricatorProjectPanelController
+final class PhabricatorProjectMenuItemController
extends PhabricatorProjectController {
public function handleRequest(AphrontRequest $request) {
diff --git a/src/applications/project/controller/PhabricatorProjectProfileController.php b/src/applications/project/controller/PhabricatorProjectProfileController.php
--- a/src/applications/project/controller/PhabricatorProjectProfileController.php
+++ b/src/applications/project/controller/PhabricatorProjectProfileController.php
@@ -70,7 +70,7 @@
->setUserPHIDs($project->getWatcherPHIDs());
$nav = $this->getProfileMenu();
- $nav->selectFilter(PhabricatorProject::PANEL_PROFILE);
+ $nav->selectFilter(PhabricatorProject::ITEM_PROFILE);
$stories = id(new PhabricatorFeedQuery())
->setViewer($viewer)
diff --git a/src/applications/project/controller/PhabricatorProjectSubprojectsController.php b/src/applications/project/controller/PhabricatorProjectSubprojectsController.php
--- a/src/applications/project/controller/PhabricatorProjectSubprojectsController.php
+++ b/src/applications/project/controller/PhabricatorProjectSubprojectsController.php
@@ -92,7 +92,7 @@
->addPropertyList($property_list);
$nav = $this->getProfileMenu();
- $nav->selectFilter(PhabricatorProject::PANEL_SUBPROJECTS);
+ $nav->selectFilter(PhabricatorProject::ITEM_SUBPROJECTS);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Subprojects'));
diff --git a/src/applications/project/controller/PhabricatorProjectViewController.php b/src/applications/project/controller/PhabricatorProjectViewController.php
--- a/src/applications/project/controller/PhabricatorProjectViewController.php
+++ b/src/applications/project/controller/PhabricatorProjectViewController.php
@@ -18,13 +18,13 @@
$project = $this->getProject();
$engine = $this->getProfileMenuEngine();
- $default = $engine->getDefaultPanel();
+ $default = $engine->getDefaultItem();
switch ($default->getBuiltinKey()) {
- case PhabricatorProject::PANEL_WORKBOARD:
+ case PhabricatorProject::ITEM_WORKBOARD:
$controller_object = new PhabricatorProjectBoardViewController();
break;
- case PhabricatorProject::PANEL_PROFILE:
+ case PhabricatorProject::ITEM_PROFILE:
default:
$controller_object = new PhabricatorProjectProfileController();
break;
diff --git a/src/applications/project/engine/PhabricatorProjectProfileMenuEngine.php b/src/applications/project/engine/PhabricatorProjectProfileMenuEngine.php
--- a/src/applications/project/engine/PhabricatorProjectProfileMenuEngine.php
+++ b/src/applications/project/engine/PhabricatorProjectProfileMenuEngine.php
@@ -7,40 +7,41 @@
return true;
}
- protected function getPanelURI($path) {
+ protected function getItemURI($path) {
$project = $this->getProfileObject();
$id = $project->getID();
- return "/project/{$id}/panel/{$path}";
+ return "/project/{$id}/item/{$path}";
}
- protected function getBuiltinProfilePanels($object) {
- $panels = array();
+ protected function getBuiltinProfileItems($object) {
+ $items = array();
- $panels[] = $this->newPanel()
- ->setBuiltinKey(PhabricatorProject::PANEL_PROFILE)
- ->setMenuItemKey(PhabricatorProjectDetailsProfilePanel::PANELKEY);
+ $items[] = $this->newItem()
+ ->setBuiltinKey(PhabricatorProject::ITEM_PROFILE)
+ ->setMenuItemKey(PhabricatorProjectDetailsProfileMenuItem::MENUITEMKEY);
- $panels[] = $this->newPanel()
- ->setBuiltinKey(PhabricatorProject::PANEL_POINTS)
- ->setMenuItemKey(PhabricatorProjectPointsProfilePanel::PANELKEY);
+ $items[] = $this->newItem()
+ ->setBuiltinKey(PhabricatorProject::ITEM_POINTS)
+ ->setMenuItemKey(PhabricatorProjectPointsProfileMenuItem::MENUITEMKEY);
- $panels[] = $this->newPanel()
- ->setBuiltinKey(PhabricatorProject::PANEL_WORKBOARD)
- ->setMenuItemKey(PhabricatorProjectWorkboardProfilePanel::PANELKEY);
+ $items[] = $this->newItem()
+ ->setBuiltinKey(PhabricatorProject::ITEM_WORKBOARD)
+ ->setMenuItemKey(PhabricatorProjectWorkboardProfileMenuItem::MENUITEMKEY);
- $panels[] = $this->newPanel()
- ->setBuiltinKey(PhabricatorProject::PANEL_MEMBERS)
- ->setMenuItemKey(PhabricatorProjectMembersProfilePanel::PANELKEY);
+ $items[] = $this->newItem()
+ ->setBuiltinKey(PhabricatorProject::ITEM_MEMBERS)
+ ->setMenuItemKey(PhabricatorProjectMembersProfileMenuItem::MENUITEMKEY);
- $panels[] = $this->newPanel()
- ->setBuiltinKey(PhabricatorProject::PANEL_SUBPROJECTS)
- ->setMenuItemKey(PhabricatorProjectSubprojectsProfilePanel::PANELKEY);
+ $items[] = $this->newItem()
+ ->setBuiltinKey(PhabricatorProject::ITEM_SUBPROJECTS)
+ ->setMenuItemKey(
+ PhabricatorProjectSubprojectsProfileMenuItem::MENUITEMKEY);
- $panels[] = $this->newPanel()
- ->setBuiltinKey(PhabricatorProject::PANEL_MANAGE)
- ->setMenuItemKey(PhabricatorProjectManageProfilePanel::PANELKEY);
+ $items[] = $this->newItem()
+ ->setBuiltinKey(PhabricatorProject::ITEM_MANAGE)
+ ->setMenuItemKey(PhabricatorProjectManageProfileMenuItem::MENUITEMKEY);
- return $panels;
+ return $items;
}
}
diff --git a/src/applications/project/profilepanel/PhabricatorProjectDetailsProfilePanel.php b/src/applications/project/menuitem/PhabricatorProjectDetailsProfileMenuItem.php
rename from src/applications/project/profilepanel/PhabricatorProjectDetailsProfilePanel.php
rename to src/applications/project/menuitem/PhabricatorProjectDetailsProfileMenuItem.php
--- a/src/applications/project/profilepanel/PhabricatorProjectDetailsProfilePanel.php
+++ b/src/applications/project/menuitem/PhabricatorProjectDetailsProfileMenuItem.php
@@ -1,11 +1,11 @@
<?php
-final class PhabricatorProjectDetailsProfilePanel
- extends PhabricatorProfilePanel {
+final class PhabricatorProjectDetailsProfileMenuItem
+ extends PhabricatorProfileMenuItem {
- const PANELKEY = 'project.details';
+ const MENUITEMKEY = 'project.details';
- public function getPanelTypeName() {
+ public function getMenuItemTypeName() {
return pht('Project Details');
}
diff --git a/src/applications/project/profilepanel/PhabricatorProjectManageProfilePanel.php b/src/applications/project/menuitem/PhabricatorProjectManageProfileMenuItem.php
rename from src/applications/project/profilepanel/PhabricatorProjectManageProfilePanel.php
rename to src/applications/project/menuitem/PhabricatorProjectManageProfileMenuItem.php
--- a/src/applications/project/profilepanel/PhabricatorProjectManageProfilePanel.php
+++ b/src/applications/project/menuitem/PhabricatorProjectManageProfileMenuItem.php
@@ -1,11 +1,11 @@
<?php
-final class PhabricatorProjectManageProfilePanel
- extends PhabricatorProfilePanel {
+final class PhabricatorProjectManageProfileMenuItem
+ extends PhabricatorProfileMenuItem {
- const PANELKEY = 'project.manage';
+ const MENUITEMKEY = 'project.manage';
- public function getPanelTypeName() {
+ public function getMenuItemTypeName() {
return pht('Manage Project');
}
@@ -13,7 +13,7 @@
return pht('Manage');
}
- public function canHidePanel(
+ public function canHideMenuItem(
PhabricatorProfileMenuItemConfiguration $config) {
return false;
}
diff --git a/src/applications/project/profilepanel/PhabricatorProjectMembersProfilePanel.php b/src/applications/project/menuitem/PhabricatorProjectMembersProfileMenuItem.php
rename from src/applications/project/profilepanel/PhabricatorProjectMembersProfilePanel.php
rename to src/applications/project/menuitem/PhabricatorProjectMembersProfileMenuItem.php
--- a/src/applications/project/profilepanel/PhabricatorProjectMembersProfilePanel.php
+++ b/src/applications/project/menuitem/PhabricatorProjectMembersProfileMenuItem.php
@@ -1,11 +1,11 @@
<?php
-final class PhabricatorProjectMembersProfilePanel
- extends PhabricatorProfilePanel {
+final class PhabricatorProjectMembersProfileMenuItem
+ extends PhabricatorProfileMenuItem {
- const PANELKEY = 'project.members';
+ const MENUITEMKEY = 'project.members';
- public function getPanelTypeName() {
+ public function getMenuItemTypeName() {
return pht('Project Members');
}
diff --git a/src/applications/project/profilepanel/PhabricatorProjectPointsProfilePanel.php b/src/applications/project/menuitem/PhabricatorProjectPointsProfileMenuItem.php
rename from src/applications/project/profilepanel/PhabricatorProjectPointsProfilePanel.php
rename to src/applications/project/menuitem/PhabricatorProjectPointsProfileMenuItem.php
--- a/src/applications/project/profilepanel/PhabricatorProjectPointsProfilePanel.php
+++ b/src/applications/project/menuitem/PhabricatorProjectPointsProfileMenuItem.php
@@ -1,11 +1,11 @@
<?php
-final class PhabricatorProjectPointsProfilePanel
- extends PhabricatorProfilePanel {
+final class PhabricatorProjectPointsProfileMenuItem
+ extends PhabricatorProfileMenuItem {
- const PANELKEY = 'project.points';
+ const MENUITEMKEY = 'project.points';
- public function getPanelTypeName() {
+ public function getMenuItemTypeName() {
return pht('Project Points');
}
diff --git a/src/applications/project/profilepanel/PhabricatorProjectSubprojectsProfilePanel.php b/src/applications/project/menuitem/PhabricatorProjectSubprojectsProfileMenuItem.php
rename from src/applications/project/profilepanel/PhabricatorProjectSubprojectsProfilePanel.php
rename to src/applications/project/menuitem/PhabricatorProjectSubprojectsProfileMenuItem.php
--- a/src/applications/project/profilepanel/PhabricatorProjectSubprojectsProfilePanel.php
+++ b/src/applications/project/menuitem/PhabricatorProjectSubprojectsProfileMenuItem.php
@@ -1,11 +1,11 @@
<?php
-final class PhabricatorProjectSubprojectsProfilePanel
- extends PhabricatorProfilePanel {
+final class PhabricatorProjectSubprojectsProfileMenuItem
+ extends PhabricatorProfileMenuItem {
- const PANELKEY = 'project.subprojects';
+ const MENUITEMKEY = 'project.subprojects';
- public function getPanelTypeName() {
+ public function getMenuItemTypeName() {
return pht('Project Subprojects');
}
diff --git a/src/applications/project/profilepanel/PhabricatorProjectWorkboardProfilePanel.php b/src/applications/project/menuitem/PhabricatorProjectWorkboardProfileMenuItem.php
rename from src/applications/project/profilepanel/PhabricatorProjectWorkboardProfilePanel.php
rename to src/applications/project/menuitem/PhabricatorProjectWorkboardProfileMenuItem.php
--- a/src/applications/project/profilepanel/PhabricatorProjectWorkboardProfilePanel.php
+++ b/src/applications/project/menuitem/PhabricatorProjectWorkboardProfileMenuItem.php
@@ -1,11 +1,11 @@
<?php
-final class PhabricatorProjectWorkboardProfilePanel
- extends PhabricatorProfilePanel {
+final class PhabricatorProjectWorkboardProfileMenuItem
+ extends PhabricatorProfileMenuItem {
- const PANELKEY = 'project.workboard';
+ const MENUITEMKEY = 'project.workboard';
- public function getPanelTypeName() {
+ public function getMenuItemTypeName() {
return pht('Project Workboard');
}
diff --git a/src/applications/project/storage/PhabricatorProject.php b/src/applications/project/storage/PhabricatorProject.php
--- a/src/applications/project/storage/PhabricatorProject.php
+++ b/src/applications/project/storage/PhabricatorProject.php
@@ -49,13 +49,13 @@
const TABLE_DATASOURCE_TOKEN = 'project_datasourcetoken';
- const PANEL_PROFILE = 'project.profile';
- const PANEL_POINTS = 'project.points';
- const PANEL_WORKBOARD = 'project.workboard';
- const PANEL_MEMBERS = 'project.members';
- const PANEL_MANAGE = 'project.manage';
- const PANEL_MILESTONES = 'project.milestones';
- const PANEL_SUBPROJECTS = 'project.subprojects';
+ const ITEM_PROFILE = 'project.profile';
+ const ITEM_POINTS = 'project.points';
+ const ITEM_WORKBOARD = 'project.workboard';
+ const ITEM_MEMBERS = 'project.members';
+ const ITEM_MANAGE = 'project.manage';
+ const ITEM_MILESTONES = 'project.milestones';
+ const ITEM_SUBPROJECTS = 'project.subprojects';
public static function initializeNewProject(PhabricatorUser $actor) {
$app = id(new PhabricatorApplicationQuery())
diff --git a/src/applications/search/editor/PhabricatorProfileMenuEditEngine.php b/src/applications/search/editor/PhabricatorProfileMenuEditEngine.php
--- a/src/applications/search/editor/PhabricatorProfileMenuEditEngine.php
+++ b/src/applications/search/editor/PhabricatorProfileMenuEditEngine.php
@@ -7,7 +7,7 @@
private $menuEngine;
private $profileObject;
- private $newPanelConfiguration;
+ private $newMenuItemConfiguration;
private $isBuiltin;
public function isEngineConfigurable() {
@@ -32,14 +32,14 @@
return $this->profileObject;
}
- public function setNewPanelConfiguration(
+ public function setNewMenuItemConfiguration(
PhabricatorProfileMenuItemConfiguration $configuration) {
- $this->newPanelConfiguration = $configuration;
+ $this->newMenuItemConfiguration = $configuration;
return $this;
}
- public function getNewPanelConfiguration() {
- return $this->newPanelConfiguration;
+ public function getNewMenuItemConfiguration() {
+ return $this->newMenuItemConfiguration;
}
public function setIsBuiltin($is_builtin) {
@@ -52,11 +52,11 @@
}
public function getEngineName() {
- return pht('Profile Panels');
+ return pht('Profile Menu Items');
}
public function getSummaryHeader() {
- return pht('Edit Profile Panel Configurations');
+ return pht('Edit Profile Menu Item Configurations');
}
public function getSummaryText() {
@@ -68,12 +68,14 @@
}
protected function newEditableObject() {
- if (!$this->newPanelConfiguration) {
+ if (!$this->newMenuItemConfiguration) {
throw new Exception(
- pht('Profile panels can not be generated without an object context.'));
+ pht(
+ 'Profile menu items can not be generated without an '.
+ 'object context.'));
}
- return clone $this->newPanelConfiguration;
+ return clone $this->newMenuItemConfiguration;
}
protected function newObjectQuery() {
@@ -121,8 +123,8 @@
}
protected function buildCustomEditFields($object) {
- $panel = $object->getPanel();
- $fields = $panel->buildEditEngineFields($object);
+ $item = $object->getMenuItem();
+ $fields = $item->buildEditEngineFields($object);
$type_property =
PhabricatorProfileMenuItemConfigurationTransaction::TYPE_PROPERTY;
diff --git a/src/applications/search/editor/PhabricatorProfileMenuEditor.php b/src/applications/search/editor/PhabricatorProfileMenuEditor.php
--- a/src/applications/search/editor/PhabricatorProfileMenuEditor.php
+++ b/src/applications/search/editor/PhabricatorProfileMenuEditor.php
@@ -60,7 +60,7 @@
case PhabricatorProfileMenuItemConfigurationTransaction::TYPE_PROPERTY:
$key = $xaction->getMetadataValue('property.key');
$value = $xaction->getNewValue();
- $object->getMenuItemProperty($key, $value);
+ $object->setMenuItemProperty($key, $value);
return;
case PhabricatorProfileMenuItemConfigurationTransaction::TYPE_ORDER:
$object->setMenuItemOrder($xaction->getNewValue());
diff --git a/src/applications/search/engine/PhabricatorProfileMenuEngine.php b/src/applications/search/engine/PhabricatorProfileMenuEngine.php
--- a/src/applications/search/engine/PhabricatorProfileMenuEngine.php
+++ b/src/applications/search/engine/PhabricatorProfileMenuEngine.php
@@ -4,8 +4,8 @@
private $viewer;
private $profileObject;
- private $panels;
- private $defaultPanel;
+ private $items;
+ private $defaultItem;
private $controller;
private $navigation;
@@ -36,18 +36,18 @@
return $this->controller;
}
- private function setDefaultPanel(
- PhabricatorProfileMenuItemConfiguration $default_panel) {
- $this->defaultPanel = $default_panel;
+ private function setDefaultItem(
+ PhabricatorProfileMenuItemConfiguration $default_item) {
+ $this->defaultItem = $default_item;
return $this;
}
- public function getDefaultPanel() {
- $this->loadPanels();
- return $this->defaultPanel;
+ public function getDefaultItem() {
+ $this->loadItems();
+ return $this->defaultItem;
}
- abstract protected function getPanelURI($path);
+ abstract protected function getItemURI($path);
abstract protected function isMenuEngineConfigurable();
@@ -59,12 +59,12 @@
$request = $controller->getRequest();
- $panel_action = $request->getURIData('panelAction');
+ $item_action = $request->getURIData('itemAction');
// If the engine is not configurable, don't respond to any of the editing
// or configuration routes.
if (!$this->isMenuEngineConfigurable()) {
- switch ($panel_action) {
+ switch ($item_action) {
case 'view':
break;
default:
@@ -72,80 +72,79 @@
}
}
- $panel_id = $request->getURIData('panelID');
+ $item_id = $request->getURIData('itemID');
+ $item_list = $this->loadItems();
- $panel_list = $this->loadPanels();
-
- $selected_panel = null;
- if (strlen($panel_id)) {
- $panel_id_int = (int)$panel_id;
- foreach ($panel_list as $panel) {
- if ($panel_id_int) {
- if ((int)$panel->getID() === $panel_id_int) {
- $selected_panel = $panel;
+ $selected_item = null;
+ if (strlen($item_id)) {
+ $item_id_int = (int)$item_id;
+ foreach ($item_list as $item) {
+ if ($item_id_int) {
+ if ((int)$item->getID() === $item_id_int) {
+ $selected_item = $item;
break;
}
}
- $builtin_key = $panel->getBuiltinKey();
- if ($builtin_key === (string)$panel_id) {
- $selected_panel = $panel;
+ $builtin_key = $item->getBuiltinKey();
+ if ($builtin_key === (string)$item_id) {
+ $selected_item = $item;
break;
}
}
}
- switch ($panel_action) {
+ switch ($item_action) {
case 'view':
case 'info':
case 'hide':
case 'default':
case 'builtin':
- if (!$selected_panel) {
+ if (!$selected_item) {
return new Aphront404Response();
}
break;
}
$navigation = $this->buildNavigation();
- $navigation->selectFilter('panel.configure');
+ $navigation->selectFilter('item.configure');
$crumbs = $controller->buildApplicationCrumbsForEditEngine();
- switch ($panel_action) {
+ switch ($item_action) {
case 'view':
- $content = $this->buildPanelViewContent($selected_panel);
+ $content = $this->buildItemViewContent($selected_item);
break;
case 'configure':
- $content = $this->buildPanelConfigureContent($panel_list);
+ $content = $this->buildItemConfigureContent($item_list);
$crumbs->addTextCrumb(pht('Configure Menu'));
break;
case 'reorder':
- $content = $this->buildPanelReorderContent($panel_list);
+ $content = $this->buildItemReorderContent($item_list);
break;
case 'new':
- $panel_key = $request->getURIData('panelKey');
- $content = $this->buildPanelNewContent($panel_key);
+ $item_key = $request->getURIData('itemKey');
+ $content = $this->buildItemNewContent($item_key);
break;
case 'builtin':
- $content = $this->buildPanelBuiltinContent($selected_panel);
+ $content = $this->buildItemBuiltinContent($selected_item);
break;
case 'hide':
- $content = $this->buildPanelHideContent($selected_panel);
+ $content = $this->buildItemHideContent($selected_item);
break;
case 'default':
- $content = $this->buildPanelDefaultContent(
- $selected_panel,
- $panel_list);
+ $content = $this->buildItemDefaultContent(
+ $selected_item,
+ $item_list);
break;
case 'edit':
- $content = $this->buildPanelEditContent();
+ $content = $this->buildItemEditContent();
break;
default:
throw new Exception(
pht(
- 'Unsupported panel action "%s".',
- $panel_action));
+ 'Unsupported item action "%s".',
+ $item_action));
}
if ($content instanceof AphrontResponse) {
@@ -170,33 +169,33 @@
$nav = id(new AphrontSideNavFilterView())
->setIsProfileMenu(true)
- ->setBaseURI(new PhutilURI($this->getPanelURI('')));
+ ->setBaseURI(new PhutilURI($this->getItemURI('')));
- $panels = $this->getPanels();
+ $menu_items = $this->getItems();
- foreach ($panels as $panel) {
- if ($panel->isDisabled()) {
+ foreach ($menu_items as $menu_item) {
+ if ($menu_item->isDisabled()) {
continue;
}
- $items = $panel->buildNavigationMenuItems();
+ $items = $menu_item->buildNavigationMenuItems();
foreach ($items as $item) {
$this->validateNavigationMenuItem($item);
}
- // If the panel produced only a single item which does not otherwise
+ // If the item produced only a single item which does not otherwise
// have a key, try to automatically assign it a reasonable key. This
// makes selecting the correct item simpler.
if (count($items) == 1) {
$item = head($items);
if ($item->getKey() === null) {
- $builtin_key = $panel->getBuiltinKey();
- $panel_phid = $panel->getPHID();
+ $builtin_key = $menu_item->getBuiltinKey();
+ $item_phid = $menu_item->getPHID();
if ($builtin_key !== null) {
$item->setKey($builtin_key);
- } else if ($panel_phid !== null) {
- $item->setKey($panel_phid);
+ } else if ($item_phid !== null) {
+ $item->setKey($item_phid);
}
}
}
@@ -217,75 +216,75 @@
return $this->navigation;
}
- private function getPanels() {
- if ($this->panels === null) {
- $this->panels = $this->loadPanels();
+ private function getItems() {
+ if ($this->items === null) {
+ $this->items = $this->loadItems();
}
- return $this->panels;
+ return $this->items;
}
- private function loadPanels() {
+ private function loadItems() {
$viewer = $this->getViewer();
$object = $this->getProfileObject();
- $panels = $this->loadBuiltinProfilePanels();
+ $items = $this->loadBuiltinProfileItems();
- $stored_panels = id(new PhabricatorProfileMenuItemConfigurationQuery())
+ $stored_items = id(new PhabricatorProfileMenuItemConfigurationQuery())
->setViewer($viewer)
->withProfilePHIDs(array($object->getPHID()))
->execute();
- foreach ($stored_panels as $stored_panel) {
- $impl = $stored_panel->getPanel();
+ foreach ($stored_items as $stored_item) {
+ $impl = $stored_item->getMenuItem();
$impl->setViewer($viewer);
}
- // Merge the stored panels into the builtin panels. If a builtin panel has
+ // Merge the stored items into the builtin items. If a builtin item has
// a stored version, replace the defaults with the stored changes.
- foreach ($stored_panels as $stored_panel) {
- if (!$stored_panel->shouldEnableForObject($object)) {
+ foreach ($stored_items as $stored_item) {
+ if (!$stored_item->shouldEnableForObject($object)) {
continue;
}
- $builtin_key = $stored_panel->getBuiltinKey();
+ $builtin_key = $stored_item->getBuiltinKey();
if ($builtin_key !== null) {
// If this builtin actually exists, replace the builtin with the
// stored configuration. Otherwise, we're just going to drop the
// stored config: it corresponds to an out-of-date or uninstalled
- // panel.
- if (isset($panels[$builtin_key])) {
- $panels[$builtin_key] = $stored_panel;
+ // item.
+ if (isset($items[$builtin_key])) {
+ $items[$builtin_key] = $stored_item;
} else {
continue;
}
} else {
- $panels[] = $stored_panel;
+ $items[] = $stored_item;
}
}
- $panels = msort($panels, 'getSortKey');
+ $items = msort($items, 'getSortKey');
// Normalize keys since callers shouldn't rely on this array being
// partially keyed.
- $panels = array_values($panels);
+ $items = array_values($items);
- // Make sure exactly one valid panel is marked as default.
+ // Make sure exactly one valid item is marked as default.
$default = null;
$first = null;
- foreach ($panels as $panel) {
- if (!$panel->canMakeDefault()) {
+ foreach ($items as $item) {
+ if (!$item->canMakeDefault()) {
continue;
}
- if ($panel->isDefault()) {
- $default = $panel;
+ if ($item->isDefault()) {
+ $default = $item;
break;
}
if ($first === null) {
- $first = $panel;
+ $first = $item;
}
}
@@ -294,17 +293,17 @@
}
if ($default) {
- $this->setDefaultPanel($default);
+ $this->setDefaultItem($default);
}
- return $panels;
+ return $items;
}
- private function loadBuiltinProfilePanels() {
+ private function loadBuiltinProfileItems() {
$object = $this->getProfileObject();
- $builtins = $this->getBuiltinProfilePanels($object);
+ $builtins = $this->getBuiltinProfileItems($object);
- $panels = PhabricatorProfilePanel::getAllPanels();
+ $items = PhabricatorProfileMenuItem::getAllMenuItems();
$viewer = $this->getViewer();
$order = 1;
@@ -315,36 +314,36 @@
if (!$builtin_key) {
throw new Exception(
pht(
- 'Object produced a builtin panel with no builtin panel key! '.
- 'Builtin panels must have a unique key.'));
+ 'Object produced a builtin item with no builtin item key! '.
+ 'Builtin items must have a unique key.'));
}
if (isset($map[$builtin_key])) {
throw new Exception(
pht(
- 'Object produced two panels with the same builtin key ("%s"). '.
- 'Each panel must have a unique builtin key.',
+ 'Object produced two items with the same builtin key ("%s"). '.
+ 'Each item must have a unique builtin key.',
$builtin_key));
}
- $panel_key = $builtin->getMenuItemKey();
+ $item_key = $builtin->getMenuItemKey();
- $panel = idx($panels, $panel_key);
- if (!$panel) {
+ $item = idx($items, $item_key);
+ if (!$item) {
throw new Exception(
pht(
- 'Builtin panel ("%s") specifies a bad panel key ("%s"); there '.
- 'is no corresponding panel implementation available.',
+ 'Builtin item ("%s") specifies a bad item key ("%s"); there '.
+ 'is no corresponding item implementation available.',
$builtin_key,
- $panel_key));
+ $item_key));
}
- $panel = clone $panel;
- $panel->setViewer($viewer);
+ $item = clone $item;
+ $item->setViewer($viewer);
$builtin
->setProfilePHID($object->getPHID())
- ->attachPanel($panel)
+ ->attachMenuItem($item)
->attachProfileObject($object)
->setMenuItemOrder($order);
@@ -437,10 +436,10 @@
}
public function getConfigureURI() {
- return $this->getPanelURI('configure/');
+ return $this->getItemURI('configure/');
}
- private function buildPanelReorderContent(array $panels) {
+ private function buildItemReorderContent(array $items) {
$viewer = $this->getViewer();
$object = $this->getProfileObject();
@@ -459,14 +458,14 @@
$by_builtin = array();
$by_id = array();
- foreach ($panels as $key => $panel) {
- $id = $panel->getID();
+ foreach ($items as $key => $item) {
+ $id = $item->getID();
if ($id) {
$by_id[$id] = $key;
continue;
}
- $builtin_key = $panel->getBuiltinKey();
+ $builtin_key = $item->getBuiltinKey();
if ($builtin_key) {
$by_builtin[$builtin_key] = $key;
continue;
@@ -485,13 +484,13 @@
}
}
- $panels = array_select_keys($panels, $key_order) + $panels;
+ $items = array_select_keys($items, $key_order) + $items;
$type_order =
PhabricatorProfileMenuItemConfigurationTransaction::TYPE_ORDER;
$order = 1;
- foreach ($panels as $panel) {
+ foreach ($items as $item) {
$xactions = array();
$xactions[] = id(new PhabricatorProfileMenuItemConfigurationTransaction())
@@ -503,7 +502,7 @@
->setActor($viewer)
->setContinueOnMissingFields(true)
->setContinueOnNoEffect(true)
- ->applyTransactions($panel, $xactions);
+ ->applyTransactions($item, $xactions);
$order++;
}
@@ -513,7 +512,7 @@
}
- private function buildPanelConfigureContent(array $panels) {
+ private function buildItemConfigureContent(array $items) {
$viewer = $this->getViewer();
$object = $this->getProfileObject();
@@ -528,34 +527,34 @@
'reorder-profile-menu-items',
array(
'listID' => $list_id,
- 'orderURI' => $this->getPanelURI('reorder/'),
+ 'orderURI' => $this->getItemURI('reorder/'),
));
$list = id(new PHUIObjectItemListView())
->setID($list_id);
- foreach ($panels as $panel) {
- $id = $panel->getID();
- $builtin_key = $panel->getBuiltinKey();
+ foreach ($items as $item) {
+ $id = $item->getID();
+ $builtin_key = $item->getBuiltinKey();
$can_edit = PhabricatorPolicyFilter::hasCapability(
$viewer,
- $panel,
+ $item,
PhabricatorPolicyCapability::CAN_EDIT);
- $item = id(new PHUIObjectItemView());
+ $view = id(new PHUIObjectItemView());
- $name = $panel->getDisplayName();
- $type = $panel->getPanelTypeName();
+ $name = $item->getDisplayName();
+ $type = $item->getMenuItemTypeName();
if (!strlen(trim($name))) {
$name = pht('Untitled "%s" Item', $type);
}
- $item->setHeader($name);
- $item->addAttribute($type);
+ $view->setHeader($name);
+ $view->addAttribute($type);
if ($can_edit) {
- $item
+ $view
->setGrippable(true)
->addSigil('profile-menu-item')
->setMetadata(
@@ -564,15 +563,15 @@
));
if ($id) {
- $default_uri = $this->getPanelURI("default/{$id}/");
+ $default_uri = $this->getItemURI("default/{$id}/");
} else {
- $default_uri = $this->getPanelURI("default/{$builtin_key}/");
+ $default_uri = $this->getItemURI("default/{$builtin_key}/");
}
- if ($panel->isDefault()) {
+ if ($item->isDefault()) {
$default_icon = 'fa-thumb-tack green';
$default_text = pht('Current Default');
- } else if ($panel->canMakeDefault()) {
+ } else if ($item->canMakeDefault()) {
$default_icon = 'fa-thumb-tack';
$default_text = pht('Make Default');
} else {
@@ -580,7 +579,7 @@
}
if ($default_text !== null) {
- $item->addAction(
+ $view->addAction(
id(new PHUIListItemView())
->setHref($default_uri)
->setWorkflow(true)
@@ -589,17 +588,17 @@
}
if ($id) {
- $item->setHref($this->getPanelURI("edit/{$id}/"));
- $hide_uri = $this->getPanelURI("hide/{$id}/");
+ $view->setHref($this->getItemURI("edit/{$id}/"));
+ $hide_uri = $this->getItemURI("hide/{$id}/");
} else {
- $item->setHref($this->getPanelURI("builtin/{$builtin_key}/"));
- $hide_uri = $this->getPanelURI("hide/{$builtin_key}/");
+ $view->setHref($this->getItemURI("builtin/{$builtin_key}/"));
+ $hide_uri = $this->getItemURI("hide/{$builtin_key}/");
}
- if ($panel->isDisabled()) {
+ if ($item->isDisabled()) {
$hide_icon = 'fa-plus';
$hide_text = pht('Enable');
- } else if ($panel->getBuiltinKey() !== null) {
+ } else if ($item->getBuiltinKey() !== null) {
$hide_icon = 'fa-times';
$hide_text = pht('Disable');
} else {
@@ -607,9 +606,9 @@
$hide_text = pht('Delete');
}
- $can_disable = $panel->canHideMenuItem();
+ $can_disable = $item->canHideMenuItem();
- $item->addAction(
+ $view->addAction(
id(new PHUIListItemView())
->setHref($hide_uri)
->setWorkflow(true)
@@ -618,35 +617,35 @@
->setIcon($hide_icon));
}
- if ($panel->isDisabled()) {
- $item->setDisabled(true);
+ if ($item->isDisabled()) {
+ $view->setDisabled(true);
}
- $list->addItem($item);
+ $list->addItem($view);
}
$action_view = id(new PhabricatorActionListView())
->setUser($viewer);
- $panel_types = PhabricatorProfilePanel::getAllPanels();
+ $item_types = PhabricatorProfileMenuItem::getAllMenuItems();
$action_view->addAction(
id(new PhabricatorActionView())
->setLabel(true)
->setName(pht('Add New Menu Item...')));
- foreach ($panel_types as $panel_type) {
- if (!$panel_type->canAddToObject($object)) {
+ foreach ($item_types as $item_type) {
+ if (!$item_type->canAddToObject($object)) {
continue;
}
- $panel_key = $panel_type->getPanelKey();
+ $item_key = $item_type->getMenuItemKey();
$action_view->addAction(
id(new PhabricatorActionView())
- ->setIcon($panel_type->getPanelTypeIcon())
- ->setName($panel_type->getPanelTypeName())
- ->setHref($this->getPanelURI("new/{$panel_key}/")));
+ ->setIcon($item_type->getMenuItemTypeIcon())
+ ->setName($item_type->getMenuItemTypeName())
+ ->setHref($this->getItemURI("new/{$item_key}/")));
}
$action_view->addAction(
@@ -682,22 +681,21 @@
return $box;
}
- private function buildPanelNewContent($panel_key) {
- $panel_types = PhabricatorProfilePanel::getAllPanels();
- $panel_type = idx($panel_types, $panel_key);
- if (!$panel_type) {
+ private function buildItemNewContent($item_key) {
+ $item_types = PhabricatorProfileMenuItem::getAllMenuItems();
+ $item_type = idx($item_types, $item_key);
+ if (!$item_type) {
return new Aphront404Response();
}
$object = $this->getProfileObject();
- if (!$panel_type->canAddToObject($object)) {
+ if (!$item_type->canAddToObject($object)) {
return new Aphront404Response();
}
- $configuration =
- PhabricatorProfileMenuItemConfiguration::initializeNewPanelConfiguration(
- $object,
- $panel_type);
+ $configuration = PhabricatorProfileMenuItemConfiguration::initializeNewItem(
+ $object,
+ $item_type);
$viewer = $this->getViewer();
@@ -711,12 +709,12 @@
return id(new PhabricatorProfileMenuEditEngine())
->setMenuEngine($this)
->setProfileObject($object)
- ->setNewPanelConfiguration($configuration)
+ ->setNewMenuItemConfiguration($configuration)
->setController($controller)
->buildResponse();
}
- private function buildPanelEditContent() {
+ private function buildItemEditContent() {
$viewer = $this->getViewer();
$object = $this->getProfileObject();
$controller = $this->getController();
@@ -728,18 +726,18 @@
->buildResponse();
}
- private function buildPanelBuiltinContent(
+ private function buildItemBuiltinContent(
PhabricatorProfileMenuItemConfiguration $configuration) {
- // If this builtin panel has already been persisted, redirect to the
+ // If this builtin item has already been persisted, redirect to the
// edit page.
$id = $configuration->getID();
if ($id) {
return id(new AphrontRedirectResponse())
- ->setURI($this->getPanelURI("edit/{$id}/"));
+ ->setURI($this->getItemURI("edit/{$id}/"));
}
- // Otherwise, act like we're creating a new panel, we're just starting
+ // Otherwise, act like we're creating a new item, we're just starting
// with the builtin template.
$viewer = $this->getViewer();
@@ -755,12 +753,12 @@
->setIsBuiltin(true)
->setMenuEngine($this)
->setProfileObject($object)
- ->setNewPanelConfiguration($configuration)
+ ->setNewMenuItemConfiguration($configuration)
->setController($controller)
->buildResponse();
}
- private function buildPanelHideContent(
+ private function buildItemHideContent(
PhabricatorProfileMenuItemConfiguration $configuration) {
$controller = $this->getController();
@@ -774,9 +772,9 @@
if (!$configuration->canHideMenuItem()) {
return $controller->newDialog()
- ->setTitle(pht('Mandatory Panel'))
+ ->setTitle(pht('Mandatory Item'))
->appendParagraph(
- pht('This panel is very important, and can not be disabled.'))
+ pht('This menu item is very important, and can not be disabled.'))
->addCancelButton($this->getConfigureURI());
}
@@ -837,9 +835,9 @@
->addSubmitButton($button);
}
- private function buildPanelDefaultContent(
+ private function buildItemDefaultContent(
PhabricatorProfileMenuItemConfiguration $configuration,
- array $panels) {
+ array $items) {
$controller = $this->getController();
$request = $controller->getRequest();
@@ -894,7 +892,7 @@
->addSubmitButton(pht('Make Default'));
}
- protected function newPanel() {
+ protected function newItem() {
return PhabricatorProfileMenuItemConfiguration::initializeNewBuiltin();
}
@@ -903,30 +901,30 @@
$request = $controller->getRequest();
$viewer = $request->getViewer();
- $panels = $this->loadPanels();
+ $items = $this->loadItems();
- // To adjust the default panel, we first change any existing panels that
- // are marked as defaults to "visible", then make the new default panel
+ // To adjust the default item, we first change any existing items that
+ // are marked as defaults to "visible", then make the new default item
// the default.
$default = array();
$visible = array();
- foreach ($panels as $panel) {
- $builtin_key = $panel->getBuiltinKey();
- $id = $panel->getID();
+ foreach ($items as $item) {
+ $builtin_key = $item->getBuiltinKey();
+ $id = $item->getID();
$is_target =
(($builtin_key !== null) && ($builtin_key === $key)) ||
(($id !== null) && ((int)$id === (int)$key));
if ($is_target) {
- if (!$panel->isDefault()) {
- $default[] = $panel;
+ if (!$item->isDefault()) {
+ $default[] = $item;
}
} else {
- if ($panel->isDefault()) {
- $visible[] = $panel;
+ if ($item->isDefault()) {
+ $visible[] = $item;
}
}
}
@@ -943,8 +941,8 @@
);
foreach ($apply as $group) {
- list($value, $panels) = $group;
- foreach ($panels as $panel) {
+ list($value, $items) = $group;
+ foreach ($items as $item) {
$xactions = array();
$xactions[] =
@@ -957,7 +955,7 @@
->setActor($viewer)
->setContinueOnMissingFields(true)
->setContinueOnNoEffect(true)
- ->applyTransactions($panel, $xactions);
+ ->applyTransactions($item, $xactions);
}
}
diff --git a/src/applications/search/profilepanel/PhabricatorApplicationProfilePanel.php b/src/applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php
rename from src/applications/search/profilepanel/PhabricatorApplicationProfilePanel.php
rename to src/applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php
--- a/src/applications/search/profilepanel/PhabricatorApplicationProfilePanel.php
+++ b/src/applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php
@@ -1,15 +1,15 @@
<?php
-final class PhabricatorApplicationProfilePanel
- extends PhabricatorProfilePanel {
+final class PhabricatorApplicationProfileMenuItem
+ extends PhabricatorProfileMenuItem {
- const PANELKEY = 'application';
+ const MENUITEMKEY = 'application';
- public function getPanelTypeIcon() {
+ public function getMenuItemTypeIcon() {
return 'fa-globe';
}
- public function getPanelTypeName() {
+ public function getMenuItemTypeName() {
return pht('Application');
}
diff --git a/src/applications/search/profilepanel/PhabricatorDividerProfilePanel.php b/src/applications/search/menuitem/PhabricatorDividerProfileMenuItem.php
rename from src/applications/search/profilepanel/PhabricatorDividerProfilePanel.php
rename to src/applications/search/menuitem/PhabricatorDividerProfileMenuItem.php
--- a/src/applications/search/profilepanel/PhabricatorDividerProfilePanel.php
+++ b/src/applications/search/menuitem/PhabricatorDividerProfileMenuItem.php
@@ -1,15 +1,15 @@
<?php
-final class PhabricatorDividerProfilePanel
- extends PhabricatorProfilePanel {
+final class PhabricatorDividerProfileMenuItem
+ extends PhabricatorProfileMenuItem {
- const PANELKEY = 'divider';
+ const MENUITEMKEY = 'divider';
- public function getPanelTypeIcon() {
+ public function getMenuItemTypeIcon() {
return 'fa-minus';
}
- public function getPanelTypeName() {
+ public function getMenuItemTypeName() {
return pht('Divider');
}
diff --git a/src/applications/search/profilepanel/PhabricatorLinkProfilePanel.php b/src/applications/search/menuitem/PhabricatorLinkProfileMenuItem.php
rename from src/applications/search/profilepanel/PhabricatorLinkProfilePanel.php
rename to src/applications/search/menuitem/PhabricatorLinkProfileMenuItem.php
--- a/src/applications/search/profilepanel/PhabricatorLinkProfilePanel.php
+++ b/src/applications/search/menuitem/PhabricatorLinkProfileMenuItem.php
@@ -1,15 +1,15 @@
<?php
-final class PhabricatorLinkProfilePanel
- extends PhabricatorProfilePanel {
+final class PhabricatorLinkProfileMenuItem
+ extends PhabricatorProfileMenuItem {
- const PANELKEY = 'link';
+ const MENUITEMKEY = 'link';
- public function getPanelTypeIcon() {
+ public function getMenuItemTypeIcon() {
return 'fa-link';
}
- public function getPanelTypeName() {
+ public function getMenuItemTypeName() {
return pht('Link');
}
@@ -38,7 +38,7 @@
id(new PhabricatorIconSetEditField())
->setKey('icon')
->setLabel(pht('Icon'))
- ->setIconSet(new PhabricatorProfilePanelIconSet())
+ ->setIconSet(new PhabricatorProfileMenuItemIconSet())
->setValue($this->getLinkIcon($config)),
);
}
@@ -73,7 +73,7 @@
$href = '#';
}
- $icon_object = id(new PhabricatorProfilePanelIconSet())
+ $icon_object = id(new PhabricatorProfileMenuItemIconSet())
->getIcon($icon);
if ($icon_object) {
$icon_class = $icon_object->getIcon();
diff --git a/src/applications/search/profilepanel/PhabricatorMotivatorProfilePanel.php b/src/applications/search/menuitem/PhabricatorMotivatorProfileMenuItem.php
rename from src/applications/search/profilepanel/PhabricatorMotivatorProfilePanel.php
rename to src/applications/search/menuitem/PhabricatorMotivatorProfileMenuItem.php
--- a/src/applications/search/profilepanel/PhabricatorMotivatorProfilePanel.php
+++ b/src/applications/search/menuitem/PhabricatorMotivatorProfileMenuItem.php
@@ -1,15 +1,15 @@
<?php
-final class PhabricatorMotivatorProfilePanel
- extends PhabricatorProfilePanel {
+final class PhabricatorMotivatorProfileMenuItem
+ extends PhabricatorProfileMenuItem {
- const PANELKEY = 'motivator';
+ const MENUITEMKEY = 'motivator';
- public function getPanelTypeIcon() {
+ public function getMenuItemTypeIcon() {
return 'fa-coffee';
}
- public function getPanelTypeName() {
+ public function getMenuItemTypeName() {
return pht('Motivator');
}
@@ -36,7 +36,7 @@
->setValue(
pht(
'Motivate your team with inspirational quotes from great minds. '.
- 'This panel shows a new quote every day.')),
+ 'This menu item shows a new quote every day.')),
id(new PhabricatorSelectEditField())
->setKey('source')
->setLabel(pht('Source'))
diff --git a/src/applications/search/profilepanel/PhabricatorProfilePanel.php b/src/applications/search/menuitem/PhabricatorProfileMenuItem.php
rename from src/applications/search/profilepanel/PhabricatorProfilePanel.php
rename to src/applications/search/menuitem/PhabricatorProfileMenuItem.php
--- a/src/applications/search/profilepanel/PhabricatorProfilePanel.php
+++ b/src/applications/search/menuitem/PhabricatorProfileMenuItem.php
@@ -1,6 +1,6 @@
<?php
-abstract class PhabricatorProfilePanel extends Phobject {
+abstract class PhabricatorProfileMenuItem extends Phobject {
private $viewer;
@@ -12,11 +12,11 @@
abstract protected function newNavigationMenuItems(
PhabricatorProfileMenuItemConfiguration $config);
- public function getPanelTypeIcon() {
+ public function getMenuItemTypeIcon() {
return null;
}
- abstract public function getPanelTypeName();
+ abstract public function getMenuItemTypeName();
abstract public function getDisplayName(
PhabricatorProfileMenuItemConfiguration $config);
@@ -34,7 +34,7 @@
return true;
}
- public function canHidePanel(
+ public function canHideMenuItem(
PhabricatorProfileMenuItemConfiguration $config) {
return true;
}
@@ -53,14 +53,14 @@
return $this->viewer;
}
- final public function getPanelKey() {
- return $this->getPhobjectClassConstant('PANELKEY');
+ final public function getMenuItemKey() {
+ return $this->getPhobjectClassConstant('MENUITEMKEY');
}
- final public static function getAllPanels() {
+ final public static function getAllMenuItems() {
return id(new PhutilClassMapQuery())
->setAncestorClass(__CLASS__)
- ->setUniqueMethod('getPanelKey')
+ ->setUniqueMethod('getMenuItemKey')
->execute();
}
diff --git a/src/applications/search/profilepanel/PhabricatorProfilePanelIconSet.php b/src/applications/search/menuitem/PhabricatorProfileMenuItemIconSet.php
rename from src/applications/search/profilepanel/PhabricatorProfilePanelIconSet.php
rename to src/applications/search/menuitem/PhabricatorProfileMenuItemIconSet.php
--- a/src/applications/search/profilepanel/PhabricatorProfilePanelIconSet.php
+++ b/src/applications/search/menuitem/PhabricatorProfileMenuItemIconSet.php
@@ -1,9 +1,9 @@
<?php
-final class PhabricatorProfilePanelIconSet
+final class PhabricatorProfileMenuItemIconSet
extends PhabricatorIconSet {
- const ICONSETKEY = 'profilepanel';
+ const ICONSETKEY = 'profilemenuitem';
public function getSelectIconTitleText() {
return pht('Choose Item Icon');
diff --git a/src/applications/search/query/PhabricatorProfileMenuItemConfigurationQuery.php b/src/applications/search/query/PhabricatorProfileMenuItemConfigurationQuery.php
--- a/src/applications/search/query/PhabricatorProfileMenuItemConfigurationQuery.php
+++ b/src/applications/search/query/PhabricatorProfileMenuItemConfigurationQuery.php
@@ -58,15 +58,15 @@
}
protected function willFilterPage(array $page) {
- $panels = PhabricatorProfilePanel::getAllPanels();
- foreach ($page as $key => $panel) {
- $panel_type = idx($panels, $panel->getMenuItemKey());
- if (!$panel_type) {
- $this->didRejectResult($panel);
+ $items = PhabricatorProfileMenuItem::getAllMenuItems();
+ foreach ($page as $key => $item) {
+ $item_type = idx($items, $item->getMenuItemKey());
+ if (!$item_type) {
+ $this->didRejectResult($item);
unset($page[$key]);
continue;
}
- $panel->attachPanel($panel_type);
+ $item->attachMenuItem($item_type);
}
if (!$page) {
@@ -82,14 +82,14 @@
->execute();
$profiles = mpull($profiles, null, 'getPHID');
- foreach ($page as $key => $panel) {
- $profile = idx($profiles, $panel->getProfilePHID());
+ foreach ($page as $key => $item) {
+ $profile = idx($profiles, $item->getProfilePHID());
if (!$profile) {
- $this->didRejectResult($panel);
+ $this->didRejectResult($item);
unset($page[$key]);
continue;
}
- $panel->attachProfileObject($profile);
+ $item->attachProfileObject($profile);
}
return $page;
diff --git a/src/applications/search/storage/PhabricatorProfileMenuItemConfiguration.php b/src/applications/search/storage/PhabricatorProfileMenuItemConfiguration.php
--- a/src/applications/search/storage/PhabricatorProfileMenuItemConfiguration.php
+++ b/src/applications/search/storage/PhabricatorProfileMenuItemConfiguration.php
@@ -15,7 +15,7 @@
protected $menuItemProperties = array();
private $profileObject = self::ATTACHABLE;
- private $panel = self::ATTACHABLE;
+ private $menuItem = self::ATTACHABLE;
const VISIBILITY_DEFAULT = 'default';
const VISIBILITY_VISIBLE = 'visible';
@@ -31,14 +31,14 @@
->setVisibility(self::VISIBILITY_VISIBLE);
}
- public static function initializeNewPanelConfiguration(
+ public static function initializeNewItem(
$profile_object,
- PhabricatorProfilePanel $panel) {
+ PhabricatorProfileMenuItem $item) {
return self::initializeNewBuiltin()
->setProfilePHID($profile_object->getPHID())
- ->setMenuItemKey($panel->getPanelKey())
- ->attachPanel($panel)
+ ->setMenuItemKey($item->getMenuItemKey())
+ ->attachMenuItem($item)
->attachProfileObject($profile_object);
}
@@ -67,13 +67,13 @@
PhabricatorProfileMenuItemPHIDType::TYPECONST);
}
- public function attachPanel(PhabricatorProfilePanel $panel) {
- $this->panel = $panel;
+ public function attachMenuItem(PhabricatorProfileMenuItem $item) {
+ $this->menuItem = $item;
return $this;
}
- public function getPanel() {
- return $this->assertAttached($this->panel);
+ public function getMenuItem() {
+ return $this->assertAttached($this->menuItem);
}
public function attachProfileObject($profile_object) {
@@ -95,27 +95,27 @@
}
public function buildNavigationMenuItems() {
- return $this->getPanel()->buildNavigationMenuItems($this);
+ return $this->getMenuItem()->buildNavigationMenuItems($this);
}
- public function getPanelTypeName() {
- return $this->getPanel()->getPanelTypeName();
+ public function getMenuItemTypeName() {
+ return $this->getMenuItem()->getMenuItemTypeName();
}
public function getDisplayName() {
- return $this->getPanel()->getDisplayName($this);
+ return $this->getMenuItem()->getDisplayName($this);
}
public function canMakeDefault() {
- return $this->getPanel()->canMakeDefault($this);
+ return $this->getMenuItem()->canMakeDefault($this);
}
public function canHideMenuItem() {
- return $this->getPanel()->canHidePanel($this);
+ return $this->getMenuItem()->canHideMenuItem($this);
}
public function shouldEnableForObject($object) {
- return $this->getPanel()->shouldEnableForObject($object);
+ return $this->getMenuItem()->shouldEnableForObject($object);
}
public function getSortKey() {
diff --git a/src/docs/user/userguide/profile_menu.diviner b/src/docs/user/userguide/profile_menu.diviner
--- a/src/docs/user/userguide/profile_menu.diviner
+++ b/src/docs/user/userguide/profile_menu.diviner
@@ -146,4 +146,4 @@
IMPORTANT: This feature is not stable, and the API is subject to change.
-To add new types of items, subclass @{class:PhabricatorProfilePanel}.
+To add new types of items, subclass @{class:PhabricatorProfileMenuItem}.

File Metadata

Mime Type
text/plain
Expires
Oct 19 2024, 2:59 PM (4 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6714273
Default Alt Text
D17028.diff (88 KB)

Event Timeline