@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
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Rename all ProfilePanels into ProfileMenuItems

Summary: Ref T11957.

Test Plan:
- Viewed an existing project profile.
- Viewed a user profile.
- Created a new project.
- Edited a profile menu.
- Added new profile items.
- Grepped for renamed symbols.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11957

Differential Revision: https://secure.phabricator.com/D17028

+389 -388
+30 -30
src/__phutil_library_map__.php
··· 1787 1787 'PhabricatorApplicationEmailCommandsController' => 'applications/meta/controller/PhabricatorApplicationEmailCommandsController.php', 1788 1788 'PhabricatorApplicationLaunchView' => 'applications/meta/view/PhabricatorApplicationLaunchView.php', 1789 1789 'PhabricatorApplicationPanelController' => 'applications/meta/controller/PhabricatorApplicationPanelController.php', 1790 - 'PhabricatorApplicationProfilePanel' => 'applications/search/profilepanel/PhabricatorApplicationProfilePanel.php', 1790 + 'PhabricatorApplicationProfileMenuItem' => 'applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php', 1791 1791 'PhabricatorApplicationQuery' => 'applications/meta/query/PhabricatorApplicationQuery.php', 1792 1792 'PhabricatorApplicationSearchController' => 'applications/search/controller/PhabricatorApplicationSearchController.php', 1793 1793 'PhabricatorApplicationSearchEngine' => 'applications/search/engine/PhabricatorApplicationSearchEngine.php', ··· 2505 2505 'PhabricatorDisabledUserController' => 'applications/auth/controller/PhabricatorDisabledUserController.php', 2506 2506 'PhabricatorDisplayPreferencesSettingsPanel' => 'applications/settings/panel/PhabricatorDisplayPreferencesSettingsPanel.php', 2507 2507 'PhabricatorDisqusAuthProvider' => 'applications/auth/provider/PhabricatorDisqusAuthProvider.php', 2508 - 'PhabricatorDividerProfilePanel' => 'applications/search/profilepanel/PhabricatorDividerProfilePanel.php', 2508 + 'PhabricatorDividerProfileMenuItem' => 'applications/search/menuitem/PhabricatorDividerProfileMenuItem.php', 2509 2509 'PhabricatorDivinerApplication' => 'applications/diviner/application/PhabricatorDivinerApplication.php', 2510 2510 'PhabricatorDoorkeeperApplication' => 'applications/doorkeeper/application/PhabricatorDoorkeeperApplication.php', 2511 2511 'PhabricatorDraft' => 'applications/draft/storage/PhabricatorDraft.php', ··· 2828 2828 'PhabricatorLegalpadDocumentPHIDType' => 'applications/legalpad/phid/PhabricatorLegalpadDocumentPHIDType.php', 2829 2829 'PhabricatorLegalpadSignaturePolicyRule' => 'applications/legalpad/policyrule/PhabricatorLegalpadSignaturePolicyRule.php', 2830 2830 'PhabricatorLibraryTestCase' => '__tests__/PhabricatorLibraryTestCase.php', 2831 - 'PhabricatorLinkProfilePanel' => 'applications/search/profilepanel/PhabricatorLinkProfilePanel.php', 2831 + 'PhabricatorLinkProfileMenuItem' => 'applications/search/menuitem/PhabricatorLinkProfileMenuItem.php', 2832 2832 'PhabricatorLipsumArtist' => 'applications/lipsum/image/PhabricatorLipsumArtist.php', 2833 2833 'PhabricatorLipsumContentSource' => 'infrastructure/contentsource/PhabricatorLipsumContentSource.php', 2834 2834 'PhabricatorLipsumGenerateWorkflow' => 'applications/lipsum/management/PhabricatorLipsumGenerateWorkflow.php', ··· 2966 2966 'PhabricatorModularTransactionType' => 'applications/transactions/storage/PhabricatorModularTransactionType.php', 2967 2967 'PhabricatorMonospacedFontSetting' => 'applications/settings/setting/PhabricatorMonospacedFontSetting.php', 2968 2968 'PhabricatorMonospacedTextareasSetting' => 'applications/settings/setting/PhabricatorMonospacedTextareasSetting.php', 2969 - 'PhabricatorMotivatorProfilePanel' => 'applications/search/profilepanel/PhabricatorMotivatorProfilePanel.php', 2969 + 'PhabricatorMotivatorProfileMenuItem' => 'applications/search/menuitem/PhabricatorMotivatorProfileMenuItem.php', 2970 2970 'PhabricatorMultiColumnUIExample' => 'applications/uiexample/examples/PhabricatorMultiColumnUIExample.php', 2971 2971 'PhabricatorMultiFactorSettingsPanel' => 'applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php', 2972 2972 'PhabricatorMultimeterApplication' => 'applications/multimeter/application/PhabricatorMultimeterApplication.php', ··· 3244 3244 'PhabricatorPeopleCreateGuidanceContext' => 'applications/people/guidance/PhabricatorPeopleCreateGuidanceContext.php', 3245 3245 'PhabricatorPeopleDatasource' => 'applications/people/typeahead/PhabricatorPeopleDatasource.php', 3246 3246 'PhabricatorPeopleDeleteController' => 'applications/people/controller/PhabricatorPeopleDeleteController.php', 3247 - 'PhabricatorPeopleDetailsProfilePanel' => 'applications/people/profilepanel/PhabricatorPeopleDetailsProfilePanel.php', 3247 + 'PhabricatorPeopleDetailsProfileMenuItem' => 'applications/people/menuitem/PhabricatorPeopleDetailsProfileMenuItem.php', 3248 3248 'PhabricatorPeopleDisableController' => 'applications/people/controller/PhabricatorPeopleDisableController.php', 3249 3249 'PhabricatorPeopleEmpowerController' => 'applications/people/controller/PhabricatorPeopleEmpowerController.php', 3250 3250 'PhabricatorPeopleExternalPHIDType' => 'applications/people/phid/PhabricatorPeopleExternalPHIDType.php', ··· 3258 3258 'PhabricatorPeopleLogSearchEngine' => 'applications/people/query/PhabricatorPeopleLogSearchEngine.php', 3259 3259 'PhabricatorPeopleLogsController' => 'applications/people/controller/PhabricatorPeopleLogsController.php', 3260 3260 'PhabricatorPeopleMainMenuBarExtension' => 'applications/people/extension/PhabricatorPeopleMainMenuBarExtension.php', 3261 - 'PhabricatorPeopleManageProfilePanel' => 'applications/people/profilepanel/PhabricatorPeopleManageProfilePanel.php', 3261 + 'PhabricatorPeopleManageProfileMenuItem' => 'applications/people/menuitem/PhabricatorPeopleManageProfileMenuItem.php', 3262 3262 'PhabricatorPeopleNewController' => 'applications/people/controller/PhabricatorPeopleNewController.php', 3263 3263 'PhabricatorPeopleNoOwnerDatasource' => 'applications/people/typeahead/PhabricatorPeopleNoOwnerDatasource.php', 3264 3264 'PhabricatorPeopleOwnerDatasource' => 'applications/people/typeahead/PhabricatorPeopleOwnerDatasource.php', ··· 3367 3367 'PhabricatorProfileMenuEditEngine' => 'applications/search/editor/PhabricatorProfileMenuEditEngine.php', 3368 3368 'PhabricatorProfileMenuEditor' => 'applications/search/editor/PhabricatorProfileMenuEditor.php', 3369 3369 'PhabricatorProfileMenuEngine' => 'applications/search/engine/PhabricatorProfileMenuEngine.php', 3370 + 'PhabricatorProfileMenuItem' => 'applications/search/menuitem/PhabricatorProfileMenuItem.php', 3370 3371 'PhabricatorProfileMenuItemConfiguration' => 'applications/search/storage/PhabricatorProfileMenuItemConfiguration.php', 3371 3372 'PhabricatorProfileMenuItemConfigurationQuery' => 'applications/search/query/PhabricatorProfileMenuItemConfigurationQuery.php', 3372 3373 'PhabricatorProfileMenuItemConfigurationTransaction' => 'applications/search/storage/PhabricatorProfileMenuItemConfigurationTransaction.php', 3373 3374 'PhabricatorProfileMenuItemConfigurationTransactionQuery' => 'applications/search/query/PhabricatorProfileMenuItemConfigurationTransactionQuery.php', 3375 + 'PhabricatorProfileMenuItemIconSet' => 'applications/search/menuitem/PhabricatorProfileMenuItemIconSet.php', 3374 3376 'PhabricatorProfileMenuItemPHIDType' => 'applications/search/phidtype/PhabricatorProfileMenuItemPHIDType.php', 3375 - 'PhabricatorProfilePanel' => 'applications/search/profilepanel/PhabricatorProfilePanel.php', 3376 - 'PhabricatorProfilePanelIconSet' => 'applications/search/profilepanel/PhabricatorProfilePanelIconSet.php', 3377 3377 'PhabricatorProject' => 'applications/project/storage/PhabricatorProject.php', 3378 3378 'PhabricatorProjectAddHeraldAction' => 'applications/project/herald/PhabricatorProjectAddHeraldAction.php', 3379 3379 'PhabricatorProjectApplication' => 'applications/project/application/PhabricatorProjectApplication.php', ··· 3411 3411 'PhabricatorProjectDatasource' => 'applications/project/typeahead/PhabricatorProjectDatasource.php', 3412 3412 'PhabricatorProjectDefaultController' => 'applications/project/controller/PhabricatorProjectDefaultController.php', 3413 3413 'PhabricatorProjectDescriptionField' => 'applications/project/customfield/PhabricatorProjectDescriptionField.php', 3414 - 'PhabricatorProjectDetailsProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectDetailsProfilePanel.php', 3414 + 'PhabricatorProjectDetailsProfileMenuItem' => 'applications/project/menuitem/PhabricatorProjectDetailsProfileMenuItem.php', 3415 3415 'PhabricatorProjectEditController' => 'applications/project/controller/PhabricatorProjectEditController.php', 3416 3416 'PhabricatorProjectEditEngine' => 'applications/project/engine/PhabricatorProjectEditEngine.php', 3417 3417 'PhabricatorProjectEditPictureController' => 'applications/project/controller/PhabricatorProjectEditPictureController.php', ··· 3432 3432 'PhabricatorProjectLogicalUserDatasource' => 'applications/project/typeahead/PhabricatorProjectLogicalUserDatasource.php', 3433 3433 'PhabricatorProjectLogicalViewerDatasource' => 'applications/project/typeahead/PhabricatorProjectLogicalViewerDatasource.php', 3434 3434 'PhabricatorProjectManageController' => 'applications/project/controller/PhabricatorProjectManageController.php', 3435 - 'PhabricatorProjectManageProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectManageProfilePanel.php', 3435 + 'PhabricatorProjectManageProfileMenuItem' => 'applications/project/menuitem/PhabricatorProjectManageProfileMenuItem.php', 3436 3436 'PhabricatorProjectMaterializedMemberEdgeType' => 'applications/project/edge/PhabricatorProjectMaterializedMemberEdgeType.php', 3437 3437 'PhabricatorProjectMemberListView' => 'applications/project/view/PhabricatorProjectMemberListView.php', 3438 3438 'PhabricatorProjectMemberOfProjectEdgeType' => 'applications/project/edge/PhabricatorProjectMemberOfProjectEdgeType.php', 3439 3439 'PhabricatorProjectMembersAddController' => 'applications/project/controller/PhabricatorProjectMembersAddController.php', 3440 3440 'PhabricatorProjectMembersDatasource' => 'applications/project/typeahead/PhabricatorProjectMembersDatasource.php', 3441 3441 'PhabricatorProjectMembersPolicyRule' => 'applications/project/policyrule/PhabricatorProjectMembersPolicyRule.php', 3442 - 'PhabricatorProjectMembersProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectMembersProfilePanel.php', 3442 + 'PhabricatorProjectMembersProfileMenuItem' => 'applications/project/menuitem/PhabricatorProjectMembersProfileMenuItem.php', 3443 3443 'PhabricatorProjectMembersRemoveController' => 'applications/project/controller/PhabricatorProjectMembersRemoveController.php', 3444 3444 'PhabricatorProjectMembersViewController' => 'applications/project/controller/PhabricatorProjectMembersViewController.php', 3445 + 'PhabricatorProjectMenuItemController' => 'applications/project/controller/PhabricatorProjectMenuItemController.php', 3445 3446 'PhabricatorProjectMoveController' => 'applications/project/controller/PhabricatorProjectMoveController.php', 3446 3447 'PhabricatorProjectNameContextFreeGrammar' => 'applications/project/lipsum/PhabricatorProjectNameContextFreeGrammar.php', 3447 3448 'PhabricatorProjectNoProjectsDatasource' => 'applications/project/typeahead/PhabricatorProjectNoProjectsDatasource.php', ··· 3449 3450 'PhabricatorProjectOrUserDatasource' => 'applications/project/typeahead/PhabricatorProjectOrUserDatasource.php', 3450 3451 'PhabricatorProjectOrUserFunctionDatasource' => 'applications/project/typeahead/PhabricatorProjectOrUserFunctionDatasource.php', 3451 3452 'PhabricatorProjectPHIDResolver' => 'applications/phid/resolver/PhabricatorProjectPHIDResolver.php', 3452 - 'PhabricatorProjectPanelController' => 'applications/project/controller/PhabricatorProjectPanelController.php', 3453 - 'PhabricatorProjectPointsProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectPointsProfilePanel.php', 3453 + 'PhabricatorProjectPointsProfileMenuItem' => 'applications/project/menuitem/PhabricatorProjectPointsProfileMenuItem.php', 3454 3454 'PhabricatorProjectProfileController' => 'applications/project/controller/PhabricatorProjectProfileController.php', 3455 3455 'PhabricatorProjectProfileMenuEngine' => 'applications/project/engine/PhabricatorProjectProfileMenuEngine.php', 3456 3456 'PhabricatorProjectProjectHasMemberEdgeType' => 'applications/project/edge/PhabricatorProjectProjectHasMemberEdgeType.php', ··· 3468 3468 'PhabricatorProjectStatus' => 'applications/project/constants/PhabricatorProjectStatus.php', 3469 3469 'PhabricatorProjectSubprojectWarningController' => 'applications/project/controller/PhabricatorProjectSubprojectWarningController.php', 3470 3470 'PhabricatorProjectSubprojectsController' => 'applications/project/controller/PhabricatorProjectSubprojectsController.php', 3471 - 'PhabricatorProjectSubprojectsProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectSubprojectsProfilePanel.php', 3471 + 'PhabricatorProjectSubprojectsProfileMenuItem' => 'applications/project/menuitem/PhabricatorProjectSubprojectsProfileMenuItem.php', 3472 3472 'PhabricatorProjectTestDataGenerator' => 'applications/project/lipsum/PhabricatorProjectTestDataGenerator.php', 3473 3473 'PhabricatorProjectTransaction' => 'applications/project/storage/PhabricatorProjectTransaction.php', 3474 3474 'PhabricatorProjectTransactionEditor' => 'applications/project/editor/PhabricatorProjectTransactionEditor.php', ··· 3481 3481 'PhabricatorProjectWatchController' => 'applications/project/controller/PhabricatorProjectWatchController.php', 3482 3482 'PhabricatorProjectWatcherListView' => 'applications/project/view/PhabricatorProjectWatcherListView.php', 3483 3483 'PhabricatorProjectWorkboardBackgroundColor' => 'applications/project/constants/PhabricatorProjectWorkboardBackgroundColor.php', 3484 - 'PhabricatorProjectWorkboardProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectWorkboardProfilePanel.php', 3484 + 'PhabricatorProjectWorkboardProfileMenuItem' => 'applications/project/menuitem/PhabricatorProjectWorkboardProfileMenuItem.php', 3485 3485 'PhabricatorProjectsCurtainExtension' => 'applications/project/engineextension/PhabricatorProjectsCurtainExtension.php', 3486 3486 'PhabricatorProjectsEditEngineExtension' => 'applications/project/engineextension/PhabricatorProjectsEditEngineExtension.php', 3487 3487 'PhabricatorProjectsEditField' => 'applications/transactions/editfield/PhabricatorProjectsEditField.php', ··· 6610 6610 'PhabricatorApplicationEmailCommandsController' => 'PhabricatorApplicationsController', 6611 6611 'PhabricatorApplicationLaunchView' => 'AphrontTagView', 6612 6612 'PhabricatorApplicationPanelController' => 'PhabricatorApplicationsController', 6613 - 'PhabricatorApplicationProfilePanel' => 'PhabricatorProfilePanel', 6613 + 'PhabricatorApplicationProfileMenuItem' => 'PhabricatorProfileMenuItem', 6614 6614 'PhabricatorApplicationQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 6615 6615 'PhabricatorApplicationSearchController' => 'PhabricatorSearchBaseController', 6616 6616 'PhabricatorApplicationSearchEngine' => 'Phobject', ··· 7452 7452 'PhabricatorDisabledUserController' => 'PhabricatorAuthController', 7453 7453 'PhabricatorDisplayPreferencesSettingsPanel' => 'PhabricatorEditEngineSettingsPanel', 7454 7454 'PhabricatorDisqusAuthProvider' => 'PhabricatorOAuth2AuthProvider', 7455 - 'PhabricatorDividerProfilePanel' => 'PhabricatorProfilePanel', 7455 + 'PhabricatorDividerProfileMenuItem' => 'PhabricatorProfileMenuItem', 7456 7456 'PhabricatorDivinerApplication' => 'PhabricatorApplication', 7457 7457 'PhabricatorDoorkeeperApplication' => 'PhabricatorApplication', 7458 7458 'PhabricatorDraft' => 'PhabricatorDraftDAO', ··· 7820 7820 'PhabricatorLegalpadDocumentPHIDType' => 'PhabricatorPHIDType', 7821 7821 'PhabricatorLegalpadSignaturePolicyRule' => 'PhabricatorPolicyRule', 7822 7822 'PhabricatorLibraryTestCase' => 'PhutilLibraryTestCase', 7823 - 'PhabricatorLinkProfilePanel' => 'PhabricatorProfilePanel', 7823 + 'PhabricatorLinkProfileMenuItem' => 'PhabricatorProfileMenuItem', 7824 7824 'PhabricatorLipsumArtist' => 'Phobject', 7825 7825 'PhabricatorLipsumContentSource' => 'PhabricatorContentSource', 7826 7826 'PhabricatorLipsumGenerateWorkflow' => 'PhabricatorLipsumManagementWorkflow', ··· 7968 7968 'PhabricatorModularTransactionType' => 'Phobject', 7969 7969 'PhabricatorMonospacedFontSetting' => 'PhabricatorStringSetting', 7970 7970 'PhabricatorMonospacedTextareasSetting' => 'PhabricatorSelectSetting', 7971 - 'PhabricatorMotivatorProfilePanel' => 'PhabricatorProfilePanel', 7971 + 'PhabricatorMotivatorProfileMenuItem' => 'PhabricatorProfileMenuItem', 7972 7972 'PhabricatorMultiColumnUIExample' => 'PhabricatorUIExample', 7973 7973 'PhabricatorMultiFactorSettingsPanel' => 'PhabricatorSettingsPanel', 7974 7974 'PhabricatorMultimeterApplication' => 'PhabricatorApplication', ··· 8310 8310 'PhabricatorPeopleCreateGuidanceContext' => 'PhabricatorGuidanceContext', 8311 8311 'PhabricatorPeopleDatasource' => 'PhabricatorTypeaheadDatasource', 8312 8312 'PhabricatorPeopleDeleteController' => 'PhabricatorPeopleController', 8313 - 'PhabricatorPeopleDetailsProfilePanel' => 'PhabricatorProfilePanel', 8313 + 'PhabricatorPeopleDetailsProfileMenuItem' => 'PhabricatorProfileMenuItem', 8314 8314 'PhabricatorPeopleDisableController' => 'PhabricatorPeopleController', 8315 8315 'PhabricatorPeopleEmpowerController' => 'PhabricatorPeopleController', 8316 8316 'PhabricatorPeopleExternalPHIDType' => 'PhabricatorPHIDType', ··· 8324 8324 'PhabricatorPeopleLogSearchEngine' => 'PhabricatorApplicationSearchEngine', 8325 8325 'PhabricatorPeopleLogsController' => 'PhabricatorPeopleController', 8326 8326 'PhabricatorPeopleMainMenuBarExtension' => 'PhabricatorMainMenuBarExtension', 8327 - 'PhabricatorPeopleManageProfilePanel' => 'PhabricatorProfilePanel', 8327 + 'PhabricatorPeopleManageProfileMenuItem' => 'PhabricatorProfileMenuItem', 8328 8328 'PhabricatorPeopleNewController' => 'PhabricatorPeopleController', 8329 8329 'PhabricatorPeopleNoOwnerDatasource' => 'PhabricatorTypeaheadDatasource', 8330 8330 'PhabricatorPeopleOwnerDatasource' => 'PhabricatorTypeaheadCompositeDatasource', ··· 8453 8453 'PhabricatorProfileMenuEditEngine' => 'PhabricatorEditEngine', 8454 8454 'PhabricatorProfileMenuEditor' => 'PhabricatorApplicationTransactionEditor', 8455 8455 'PhabricatorProfileMenuEngine' => 'Phobject', 8456 + 'PhabricatorProfileMenuItem' => 'Phobject', 8456 8457 'PhabricatorProfileMenuItemConfiguration' => array( 8457 8458 'PhabricatorSearchDAO', 8458 8459 'PhabricatorPolicyInterface', ··· 8462 8463 'PhabricatorProfileMenuItemConfigurationQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 8463 8464 'PhabricatorProfileMenuItemConfigurationTransaction' => 'PhabricatorApplicationTransaction', 8464 8465 'PhabricatorProfileMenuItemConfigurationTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 8466 + 'PhabricatorProfileMenuItemIconSet' => 'PhabricatorIconSet', 8465 8467 'PhabricatorProfileMenuItemPHIDType' => 'PhabricatorPHIDType', 8466 - 'PhabricatorProfilePanel' => 'Phobject', 8467 - 'PhabricatorProfilePanelIconSet' => 'PhabricatorIconSet', 8468 8468 'PhabricatorProject' => array( 8469 8469 'PhabricatorProjectDAO', 8470 8470 'PhabricatorApplicationTransactionInterface', ··· 8525 8525 'PhabricatorProjectDatasource' => 'PhabricatorTypeaheadDatasource', 8526 8526 'PhabricatorProjectDefaultController' => 'PhabricatorProjectBoardController', 8527 8527 'PhabricatorProjectDescriptionField' => 'PhabricatorProjectStandardCustomField', 8528 - 'PhabricatorProjectDetailsProfilePanel' => 'PhabricatorProfilePanel', 8528 + 'PhabricatorProjectDetailsProfileMenuItem' => 'PhabricatorProfileMenuItem', 8529 8529 'PhabricatorProjectEditController' => 'PhabricatorProjectController', 8530 8530 'PhabricatorProjectEditEngine' => 'PhabricatorEditEngine', 8531 8531 'PhabricatorProjectEditPictureController' => 'PhabricatorProjectController', ··· 8545 8545 'PhabricatorProjectLogicalUserDatasource' => 'PhabricatorTypeaheadCompositeDatasource', 8546 8546 'PhabricatorProjectLogicalViewerDatasource' => 'PhabricatorTypeaheadDatasource', 8547 8547 'PhabricatorProjectManageController' => 'PhabricatorProjectController', 8548 - 'PhabricatorProjectManageProfilePanel' => 'PhabricatorProfilePanel', 8548 + 'PhabricatorProjectManageProfileMenuItem' => 'PhabricatorProfileMenuItem', 8549 8549 'PhabricatorProjectMaterializedMemberEdgeType' => 'PhabricatorEdgeType', 8550 8550 'PhabricatorProjectMemberListView' => 'PhabricatorProjectUserListView', 8551 8551 'PhabricatorProjectMemberOfProjectEdgeType' => 'PhabricatorEdgeType', 8552 8552 'PhabricatorProjectMembersAddController' => 'PhabricatorProjectController', 8553 8553 'PhabricatorProjectMembersDatasource' => 'PhabricatorTypeaheadCompositeDatasource', 8554 8554 'PhabricatorProjectMembersPolicyRule' => 'PhabricatorPolicyRule', 8555 - 'PhabricatorProjectMembersProfilePanel' => 'PhabricatorProfilePanel', 8555 + 'PhabricatorProjectMembersProfileMenuItem' => 'PhabricatorProfileMenuItem', 8556 8556 'PhabricatorProjectMembersRemoveController' => 'PhabricatorProjectController', 8557 8557 'PhabricatorProjectMembersViewController' => 'PhabricatorProjectController', 8558 + 'PhabricatorProjectMenuItemController' => 'PhabricatorProjectController', 8558 8559 'PhabricatorProjectMoveController' => 'PhabricatorProjectController', 8559 8560 'PhabricatorProjectNameContextFreeGrammar' => 'PhutilContextFreeGrammar', 8560 8561 'PhabricatorProjectNoProjectsDatasource' => 'PhabricatorTypeaheadDatasource', ··· 8562 8563 'PhabricatorProjectOrUserDatasource' => 'PhabricatorTypeaheadCompositeDatasource', 8563 8564 'PhabricatorProjectOrUserFunctionDatasource' => 'PhabricatorTypeaheadCompositeDatasource', 8564 8565 'PhabricatorProjectPHIDResolver' => 'PhabricatorPHIDResolver', 8565 - 'PhabricatorProjectPanelController' => 'PhabricatorProjectController', 8566 - 'PhabricatorProjectPointsProfilePanel' => 'PhabricatorProfilePanel', 8566 + 'PhabricatorProjectPointsProfileMenuItem' => 'PhabricatorProfileMenuItem', 8567 8567 'PhabricatorProjectProfileController' => 'PhabricatorProjectController', 8568 8568 'PhabricatorProjectProfileMenuEngine' => 'PhabricatorProfileMenuEngine', 8569 8569 'PhabricatorProjectProjectHasMemberEdgeType' => 'PhabricatorEdgeType', ··· 8584 8584 'PhabricatorProjectStatus' => 'Phobject', 8585 8585 'PhabricatorProjectSubprojectWarningController' => 'PhabricatorProjectController', 8586 8586 'PhabricatorProjectSubprojectsController' => 'PhabricatorProjectController', 8587 - 'PhabricatorProjectSubprojectsProfilePanel' => 'PhabricatorProfilePanel', 8587 + 'PhabricatorProjectSubprojectsProfileMenuItem' => 'PhabricatorProfileMenuItem', 8588 8588 'PhabricatorProjectTestDataGenerator' => 'PhabricatorTestDataGenerator', 8589 8589 'PhabricatorProjectTransaction' => 'PhabricatorApplicationTransaction', 8590 8590 'PhabricatorProjectTransactionEditor' => 'PhabricatorApplicationTransactionEditor', ··· 8597 8597 'PhabricatorProjectWatchController' => 'PhabricatorProjectController', 8598 8598 'PhabricatorProjectWatcherListView' => 'PhabricatorProjectUserListView', 8599 8599 'PhabricatorProjectWorkboardBackgroundColor' => 'Phobject', 8600 - 'PhabricatorProjectWorkboardProfilePanel' => 'PhabricatorProfilePanel', 8600 + 'PhabricatorProjectWorkboardProfileMenuItem' => 'PhabricatorProfileMenuItem', 8601 8601 'PhabricatorProjectsCurtainExtension' => 'PHUICurtainExtension', 8602 8602 'PhabricatorProjectsEditEngineExtension' => 'PhabricatorEditEngineExtension', 8603 8603 'PhabricatorProjectsEditField' => 'PhabricatorTokenizerEditField',
+9 -9
src/applications/base/PhabricatorApplication.php
··· 627 627 return $base.'(?:query/(?P<queryKey>[^/]+)/)?'; 628 628 } 629 629 630 - protected function getPanelRouting($controller) { 630 + protected function getProfileMenuRouting($controller) { 631 631 $edit_route = $this->getEditRoutePattern(); 632 632 633 633 return array( 634 - '(?P<panelAction>view)/(?P<panelID>[^/]+)/' => $controller, 635 - '(?P<panelAction>hide)/(?P<panelID>[^/]+)/' => $controller, 636 - '(?P<panelAction>default)/(?P<panelID>[^/]+)/' => $controller, 637 - '(?P<panelAction>configure)/' => $controller, 638 - '(?P<panelAction>reorder)/' => $controller, 639 - '(?P<panelAction>edit)/'.$edit_route => $controller, 640 - '(?P<panelAction>new)/(?<panelKey>[^/]+)/'.$edit_route => $controller, 641 - '(?P<panelAction>builtin)/(?<panelID>[^/]+)/'.$edit_route 634 + '(?P<itemAction>view)/(?P<itemID>[^/]+)/' => $controller, 635 + '(?P<itemAction>hide)/(?P<itemID>[^/]+)/' => $controller, 636 + '(?P<itemAction>default)/(?P<itemID>[^/]+)/' => $controller, 637 + '(?P<itemAction>configure)/' => $controller, 638 + '(?P<itemAction>reorder)/' => $controller, 639 + '(?P<itemAction>edit)/'.$edit_route => $controller, 640 + '(?P<itemAction>new)/(?<itemKey>[^/]+)/'.$edit_route => $controller, 641 + '(?P<itemAction>builtin)/(?<itemID>[^/]+)/'.$edit_route 642 642 => $controller, 643 643 ); 644 644 }
+2 -2
src/applications/people/application/PhabricatorPeopleApplication.php
··· 71 71 ), 72 72 '/p/(?P<username>[\w._-]+)/' => array( 73 73 '' => 'PhabricatorPeopleProfileViewController', 74 - 'panel/' 75 - => $this->getPanelRouting('PhabricatorPeopleProfilePanelController'), 74 + 'item/' => $this->getProfileMenuRouting( 75 + 'PhabricatorPeopleProfileMenuController'), 76 76 ), 77 77 ); 78 78 }
+1 -1
src/applications/people/controller/PhabricatorPeopleProfileEditController.php
··· 85 85 $crumbs->setBorder(true); 86 86 87 87 $nav = $this->getProfileMenu(); 88 - $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::PANEL_MANAGE); 88 + $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::ITEM_MANAGE); 89 89 90 90 $header = id(new PHUIHeaderView()) 91 91 ->setHeader(pht('Edit Profile: %s', $user->getFullName()))
+1 -1
src/applications/people/controller/PhabricatorPeopleProfileManageController.php
··· 43 43 $name = $user->getUsername(); 44 44 45 45 $nav = $this->getProfileMenu(); 46 - $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::PANEL_MANAGE); 46 + $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::ITEM_MANAGE); 47 47 48 48 $timeline = $this->buildTransactionTimeline( 49 49 $user,
+1 -1
src/applications/people/controller/PhabricatorPeopleProfilePictureController.php
··· 256 256 $crumbs->setBorder(true); 257 257 258 258 $nav = $this->getProfileMenu(); 259 - $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::PANEL_MANAGE); 259 + $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::ITEM_MANAGE); 260 260 261 261 $header = id(new PHUIHeaderView()) 262 262 ->setHeader(pht('Edit Profile Picture'))
+1 -1
src/applications/people/controller/PhabricatorPeopleProfileViewController.php
··· 78 78 )); 79 79 80 80 $nav = $this->getProfileMenu(); 81 - $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::PANEL_PROFILE); 81 + $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::ITEM_PROFILE); 82 82 83 83 $crumbs = $this->buildApplicationCrumbs(); 84 84 $crumbs->setBorder(true);
+19 -19
src/applications/people/engine/PhabricatorPeopleProfileMenuEngine.php
··· 3 3 final class PhabricatorPeopleProfileMenuEngine 4 4 extends PhabricatorProfileMenuEngine { 5 5 6 - const PANEL_PROFILE = 'people.profile'; 7 - const PANEL_MANAGE = 'people.manage'; 6 + const ITEM_PROFILE = 'people.profile'; 7 + const ITEM_MANAGE = 'people.manage'; 8 8 9 9 protected function isMenuEngineConfigurable() { 10 10 return false; 11 11 } 12 12 13 - protected function getPanelURI($path) { 13 + protected function getItemURI($path) { 14 14 $user = $this->getProfileObject(); 15 15 $username = $user->getUsername(); 16 16 $username = phutil_escape_uri($username); 17 - return "/p/{$username}/panel/{$path}"; 17 + return "/p/{$username}/item/{$path}"; 18 18 } 19 19 20 - protected function getBuiltinProfilePanels($object) { 20 + protected function getBuiltinProfileItems($object) { 21 21 $viewer = $this->getViewer(); 22 22 23 - $panels = array(); 23 + $items = array(); 24 24 25 - $panels[] = $this->newPanel() 26 - ->setBuiltinKey(self::PANEL_PROFILE) 27 - ->setMenuItemKey(PhabricatorPeopleDetailsProfilePanel::PANELKEY); 25 + $items[] = $this->newItem() 26 + ->setBuiltinKey(self::ITEM_PROFILE) 27 + ->setMenuItemKey(PhabricatorPeopleDetailsProfileMenuItem::MENUITEMKEY); 28 28 29 29 $have_maniphest = PhabricatorApplication::isClassInstalledForViewer( 30 30 'PhabricatorManiphestApplication', ··· 34 34 '/maniphest/?statuses=open()&assigned=%s#R', 35 35 $object->getPHID()); 36 36 37 - $panels[] = $this->newPanel() 37 + $items[] = $this->newItem() 38 38 ->setBuiltinKey('tasks') 39 - ->setMenuItemKey(PhabricatorLinkProfilePanel::PANELKEY) 39 + ->setMenuItemKey(PhabricatorLinkProfileMenuItem::MENUITEMKEY) 40 40 ->setMenuItemProperty('icon', 'maniphest') 41 41 ->setMenuItemProperty('name', pht('Open Tasks')) 42 42 ->setMenuItemProperty('uri', $uri); ··· 50 50 '/differential/?authors=%s#R', 51 51 $object->getPHID()); 52 52 53 - $panels[] = $this->newPanel() 53 + $items[] = $this->newItem() 54 54 ->setBuiltinKey('revisions') 55 - ->setMenuItemKey(PhabricatorLinkProfilePanel::PANELKEY) 55 + ->setMenuItemKey(PhabricatorLinkProfileMenuItem::MENUITEMKEY) 56 56 ->setMenuItemProperty('icon', 'differential') 57 57 ->setMenuItemProperty('name', pht('Revisions')) 58 58 ->setMenuItemProperty('uri', $uri); ··· 66 66 '/audit/?authors=%s#R', 67 67 $object->getPHID()); 68 68 69 - $panels[] = $this->newPanel() 69 + $items[] = $this->newItem() 70 70 ->setBuiltinKey('commits') 71 - ->setMenuItemKey(PhabricatorLinkProfilePanel::PANELKEY) 71 + ->setMenuItemKey(PhabricatorLinkProfileMenuItem::MENUITEMKEY) 72 72 ->setMenuItemProperty('icon', 'diffusion') 73 73 ->setMenuItemProperty('name', pht('Commits')) 74 74 ->setMenuItemProperty('uri', $uri); 75 75 } 76 76 77 - $panels[] = $this->newPanel() 78 - ->setBuiltinKey(self::PANEL_MANAGE) 79 - ->setMenuItemKey(PhabricatorPeopleManageProfilePanel::PANELKEY); 77 + $items[] = $this->newItem() 78 + ->setBuiltinKey(self::ITEM_MANAGE) 79 + ->setMenuItemKey(PhabricatorPeopleManageProfileMenuItem::MENUITEMKEY); 80 80 81 - return $panels; 81 + return $items; 82 82 } 83 83 84 84 }
+4 -4
src/applications/people/profilepanel/PhabricatorPeopleDetailsProfilePanel.php src/applications/people/menuitem/PhabricatorPeopleDetailsProfileMenuItem.php
··· 1 1 <?php 2 2 3 - final class PhabricatorPeopleDetailsProfilePanel 4 - extends PhabricatorProfilePanel { 3 + final class PhabricatorPeopleDetailsProfileMenuItem 4 + extends PhabricatorProfileMenuItem { 5 5 6 - const PANELKEY = 'people.details'; 6 + const MENUITEMKEY = 'people.details'; 7 7 8 - public function getPanelTypeName() { 8 + public function getMenuItemTypeName() { 9 9 return pht('User Details'); 10 10 } 11 11
+5 -5
src/applications/people/profilepanel/PhabricatorPeopleManageProfilePanel.php src/applications/people/menuitem/PhabricatorPeopleManageProfileMenuItem.php
··· 1 1 <?php 2 2 3 - final class PhabricatorPeopleManageProfilePanel 4 - extends PhabricatorProfilePanel { 3 + final class PhabricatorPeopleManageProfileMenuItem 4 + extends PhabricatorProfileMenuItem { 5 5 6 - const PANELKEY = 'people.manage'; 6 + const MENUITEMKEY = 'people.manage'; 7 7 8 - public function getPanelTypeName() { 8 + public function getMenuItemTypeName() { 9 9 return pht('Manage User'); 10 10 } 11 11 ··· 13 13 return pht('Manage'); 14 14 } 15 15 16 - public function canHidePanel( 16 + public function canHideMenuItem( 17 17 PhabricatorProfileMenuItemConfiguration $config) { 18 18 return false; 19 19 }
+2 -2
src/applications/project/application/PhabricatorProjectApplication.php
··· 61 61 => 'PhabricatorProjectEditPictureController', 62 62 $this->getEditRoutePattern('edit/') 63 63 => 'PhabricatorProjectEditController', 64 - '(?P<projectID>[1-9]\d*)/panel/' 65 - => $this->getPanelRouting('PhabricatorProjectPanelController'), 64 + '(?P<projectID>[1-9]\d*)/item/' => $this->getProfileMenuRouting( 65 + 'PhabricatorProjectMenuItemController'), 66 66 'subprojects/(?P<id>[1-9]\d*)/' 67 67 => 'PhabricatorProjectSubprojectsController', 68 68 'board/(?P<id>[1-9]\d*)/'.
+1 -1
src/applications/project/controller/PhabricatorProjectBoardController.php
··· 6 6 protected function getProfileMenu() { 7 7 $menu = parent::getProfileMenu(); 8 8 9 - $menu->selectFilter(PhabricatorProject::PANEL_WORKBOARD); 9 + $menu->selectFilter(PhabricatorProject::ITEM_WORKBOARD); 10 10 $menu->addClass('project-board-nav'); 11 11 12 12 return $menu;
+2 -2
src/applications/project/controller/PhabricatorProjectBoardViewController.php
··· 170 170 } 171 171 172 172 $nav = $this->getProfileMenu(); 173 - $nav->selectFilter(PhabricatorProject::PANEL_WORKBOARD); 173 + $nav->selectFilter(PhabricatorProject::ITEM_WORKBOARD); 174 174 175 175 $crumbs = $this->buildApplicationCrumbs(); 176 176 $crumbs->addTextCrumb(pht('Workboard')); ··· 936 936 if ($set_default) { 937 937 $this 938 938 ->getProfileMenuEngine() 939 - ->adjustDefault(PhabricatorProject::PANEL_WORKBOARD); 939 + ->adjustDefault(PhabricatorProject::ITEM_WORKBOARD); 940 940 } 941 941 942 942 if ($request->isFormPost()) {
+1 -1
src/applications/project/controller/PhabricatorProjectEditPictureController.php
··· 255 255 ->setForm($upload_form); 256 256 257 257 $nav = $this->getProfileMenu(); 258 - $nav->selectFilter(PhabricatorProject::PANEL_MANAGE); 258 + $nav->selectFilter(PhabricatorProject::ITEM_MANAGE); 259 259 260 260 return $this->newPage() 261 261 ->setTitle($title)
+2 -2
src/applications/project/controller/PhabricatorProjectManageController.php
··· 39 39 $timeline->setShouldTerminate(true); 40 40 41 41 $nav = $this->getProfileMenu(); 42 - $nav->selectFilter(PhabricatorProject::PANEL_MANAGE); 42 + $nav->selectFilter(PhabricatorProject::ITEM_MANAGE); 43 43 44 44 $crumbs = $this->buildApplicationCrumbs(); 45 45 $crumbs->addTextCrumb(pht('Manage')); ··· 91 91 id(new PhabricatorActionView()) 92 92 ->setName(pht('Edit Menu')) 93 93 ->setIcon('fa-th-list') 94 - ->setHref($this->getApplicationURI("{$id}/panel/configure/")) 94 + ->setHref($this->getApplicationURI("{$id}/item/configure/")) 95 95 ->setDisabled(!$can_edit) 96 96 ->setWorkflow(!$can_edit)); 97 97
+1 -1
src/applications/project/controller/PhabricatorProjectMembersViewController.php
··· 42 42 ->setUserPHIDs($project->getWatcherPHIDs()); 43 43 44 44 $nav = $this->getProfileMenu(); 45 - $nav->selectFilter(PhabricatorProject::PANEL_MEMBERS); 45 + $nav->selectFilter(PhabricatorProject::ITEM_MEMBERS); 46 46 47 47 $crumbs = $this->buildApplicationCrumbs(); 48 48 $crumbs->addTextCrumb(pht('Members'));
+1 -1
src/applications/project/controller/PhabricatorProjectPanelController.php src/applications/project/controller/PhabricatorProjectMenuItemController.php
··· 1 1 <?php 2 2 3 - final class PhabricatorProjectPanelController 3 + final class PhabricatorProjectMenuItemController 4 4 extends PhabricatorProjectController { 5 5 6 6 public function handleRequest(AphrontRequest $request) {
+1 -1
src/applications/project/controller/PhabricatorProjectProfileController.php
··· 70 70 ->setUserPHIDs($project->getWatcherPHIDs()); 71 71 72 72 $nav = $this->getProfileMenu(); 73 - $nav->selectFilter(PhabricatorProject::PANEL_PROFILE); 73 + $nav->selectFilter(PhabricatorProject::ITEM_PROFILE); 74 74 75 75 $stories = id(new PhabricatorFeedQuery()) 76 76 ->setViewer($viewer)
+1 -1
src/applications/project/controller/PhabricatorProjectSubprojectsController.php
··· 92 92 ->addPropertyList($property_list); 93 93 94 94 $nav = $this->getProfileMenu(); 95 - $nav->selectFilter(PhabricatorProject::PANEL_SUBPROJECTS); 95 + $nav->selectFilter(PhabricatorProject::ITEM_SUBPROJECTS); 96 96 97 97 $crumbs = $this->buildApplicationCrumbs(); 98 98 $crumbs->addTextCrumb(pht('Subprojects'));
+3 -3
src/applications/project/controller/PhabricatorProjectViewController.php
··· 18 18 $project = $this->getProject(); 19 19 20 20 $engine = $this->getProfileMenuEngine(); 21 - $default = $engine->getDefaultPanel(); 21 + $default = $engine->getDefaultItem(); 22 22 23 23 switch ($default->getBuiltinKey()) { 24 - case PhabricatorProject::PANEL_WORKBOARD: 24 + case PhabricatorProject::ITEM_WORKBOARD: 25 25 $controller_object = new PhabricatorProjectBoardViewController(); 26 26 break; 27 - case PhabricatorProject::PANEL_PROFILE: 27 + case PhabricatorProject::ITEM_PROFILE: 28 28 default: 29 29 $controller_object = new PhabricatorProjectProfileController(); 30 30 break;
+24 -23
src/applications/project/engine/PhabricatorProjectProfileMenuEngine.php
··· 7 7 return true; 8 8 } 9 9 10 - protected function getPanelURI($path) { 10 + protected function getItemURI($path) { 11 11 $project = $this->getProfileObject(); 12 12 $id = $project->getID(); 13 - return "/project/{$id}/panel/{$path}"; 13 + return "/project/{$id}/item/{$path}"; 14 14 } 15 15 16 - protected function getBuiltinProfilePanels($object) { 17 - $panels = array(); 16 + protected function getBuiltinProfileItems($object) { 17 + $items = array(); 18 18 19 - $panels[] = $this->newPanel() 20 - ->setBuiltinKey(PhabricatorProject::PANEL_PROFILE) 21 - ->setMenuItemKey(PhabricatorProjectDetailsProfilePanel::PANELKEY); 19 + $items[] = $this->newItem() 20 + ->setBuiltinKey(PhabricatorProject::ITEM_PROFILE) 21 + ->setMenuItemKey(PhabricatorProjectDetailsProfileMenuItem::MENUITEMKEY); 22 22 23 - $panels[] = $this->newPanel() 24 - ->setBuiltinKey(PhabricatorProject::PANEL_POINTS) 25 - ->setMenuItemKey(PhabricatorProjectPointsProfilePanel::PANELKEY); 23 + $items[] = $this->newItem() 24 + ->setBuiltinKey(PhabricatorProject::ITEM_POINTS) 25 + ->setMenuItemKey(PhabricatorProjectPointsProfileMenuItem::MENUITEMKEY); 26 26 27 - $panels[] = $this->newPanel() 28 - ->setBuiltinKey(PhabricatorProject::PANEL_WORKBOARD) 29 - ->setMenuItemKey(PhabricatorProjectWorkboardProfilePanel::PANELKEY); 27 + $items[] = $this->newItem() 28 + ->setBuiltinKey(PhabricatorProject::ITEM_WORKBOARD) 29 + ->setMenuItemKey(PhabricatorProjectWorkboardProfileMenuItem::MENUITEMKEY); 30 30 31 - $panels[] = $this->newPanel() 32 - ->setBuiltinKey(PhabricatorProject::PANEL_MEMBERS) 33 - ->setMenuItemKey(PhabricatorProjectMembersProfilePanel::PANELKEY); 31 + $items[] = $this->newItem() 32 + ->setBuiltinKey(PhabricatorProject::ITEM_MEMBERS) 33 + ->setMenuItemKey(PhabricatorProjectMembersProfileMenuItem::MENUITEMKEY); 34 34 35 - $panels[] = $this->newPanel() 36 - ->setBuiltinKey(PhabricatorProject::PANEL_SUBPROJECTS) 37 - ->setMenuItemKey(PhabricatorProjectSubprojectsProfilePanel::PANELKEY); 35 + $items[] = $this->newItem() 36 + ->setBuiltinKey(PhabricatorProject::ITEM_SUBPROJECTS) 37 + ->setMenuItemKey( 38 + PhabricatorProjectSubprojectsProfileMenuItem::MENUITEMKEY); 38 39 39 - $panels[] = $this->newPanel() 40 - ->setBuiltinKey(PhabricatorProject::PANEL_MANAGE) 41 - ->setMenuItemKey(PhabricatorProjectManageProfilePanel::PANELKEY); 40 + $items[] = $this->newItem() 41 + ->setBuiltinKey(PhabricatorProject::ITEM_MANAGE) 42 + ->setMenuItemKey(PhabricatorProjectManageProfileMenuItem::MENUITEMKEY); 42 43 43 - return $panels; 44 + return $items; 44 45 } 45 46 46 47 }
+4 -4
src/applications/project/profilepanel/PhabricatorProjectDetailsProfilePanel.php src/applications/project/menuitem/PhabricatorProjectDetailsProfileMenuItem.php
··· 1 1 <?php 2 2 3 - final class PhabricatorProjectDetailsProfilePanel 4 - extends PhabricatorProfilePanel { 3 + final class PhabricatorProjectDetailsProfileMenuItem 4 + extends PhabricatorProfileMenuItem { 5 5 6 - const PANELKEY = 'project.details'; 6 + const MENUITEMKEY = 'project.details'; 7 7 8 - public function getPanelTypeName() { 8 + public function getMenuItemTypeName() { 9 9 return pht('Project Details'); 10 10 } 11 11
+5 -5
src/applications/project/profilepanel/PhabricatorProjectManageProfilePanel.php src/applications/project/menuitem/PhabricatorProjectManageProfileMenuItem.php
··· 1 1 <?php 2 2 3 - final class PhabricatorProjectManageProfilePanel 4 - extends PhabricatorProfilePanel { 3 + final class PhabricatorProjectManageProfileMenuItem 4 + extends PhabricatorProfileMenuItem { 5 5 6 - const PANELKEY = 'project.manage'; 6 + const MENUITEMKEY = 'project.manage'; 7 7 8 - public function getPanelTypeName() { 8 + public function getMenuItemTypeName() { 9 9 return pht('Manage Project'); 10 10 } 11 11 ··· 13 13 return pht('Manage'); 14 14 } 15 15 16 - public function canHidePanel( 16 + public function canHideMenuItem( 17 17 PhabricatorProfileMenuItemConfiguration $config) { 18 18 return false; 19 19 }
+4 -4
src/applications/project/profilepanel/PhabricatorProjectMembersProfilePanel.php src/applications/project/menuitem/PhabricatorProjectMembersProfileMenuItem.php
··· 1 1 <?php 2 2 3 - final class PhabricatorProjectMembersProfilePanel 4 - extends PhabricatorProfilePanel { 3 + final class PhabricatorProjectMembersProfileMenuItem 4 + extends PhabricatorProfileMenuItem { 5 5 6 - const PANELKEY = 'project.members'; 6 + const MENUITEMKEY = 'project.members'; 7 7 8 - public function getPanelTypeName() { 8 + public function getMenuItemTypeName() { 9 9 return pht('Project Members'); 10 10 } 11 11
+4 -4
src/applications/project/profilepanel/PhabricatorProjectPointsProfilePanel.php src/applications/project/menuitem/PhabricatorProjectPointsProfileMenuItem.php
··· 1 1 <?php 2 2 3 - final class PhabricatorProjectPointsProfilePanel 4 - extends PhabricatorProfilePanel { 3 + final class PhabricatorProjectPointsProfileMenuItem 4 + extends PhabricatorProfileMenuItem { 5 5 6 - const PANELKEY = 'project.points'; 6 + const MENUITEMKEY = 'project.points'; 7 7 8 - public function getPanelTypeName() { 8 + public function getMenuItemTypeName() { 9 9 return pht('Project Points'); 10 10 } 11 11
+4 -4
src/applications/project/profilepanel/PhabricatorProjectSubprojectsProfilePanel.php src/applications/project/menuitem/PhabricatorProjectSubprojectsProfileMenuItem.php
··· 1 1 <?php 2 2 3 - final class PhabricatorProjectSubprojectsProfilePanel 4 - extends PhabricatorProfilePanel { 3 + final class PhabricatorProjectSubprojectsProfileMenuItem 4 + extends PhabricatorProfileMenuItem { 5 5 6 - const PANELKEY = 'project.subprojects'; 6 + const MENUITEMKEY = 'project.subprojects'; 7 7 8 - public function getPanelTypeName() { 8 + public function getMenuItemTypeName() { 9 9 return pht('Project Subprojects'); 10 10 } 11 11
+4 -4
src/applications/project/profilepanel/PhabricatorProjectWorkboardProfilePanel.php src/applications/project/menuitem/PhabricatorProjectWorkboardProfileMenuItem.php
··· 1 1 <?php 2 2 3 - final class PhabricatorProjectWorkboardProfilePanel 4 - extends PhabricatorProfilePanel { 3 + final class PhabricatorProjectWorkboardProfileMenuItem 4 + extends PhabricatorProfileMenuItem { 5 5 6 - const PANELKEY = 'project.workboard'; 6 + const MENUITEMKEY = 'project.workboard'; 7 7 8 - public function getPanelTypeName() { 8 + public function getMenuItemTypeName() { 9 9 return pht('Project Workboard'); 10 10 } 11 11
+7 -7
src/applications/project/storage/PhabricatorProject.php
··· 49 49 50 50 const TABLE_DATASOURCE_TOKEN = 'project_datasourcetoken'; 51 51 52 - const PANEL_PROFILE = 'project.profile'; 53 - const PANEL_POINTS = 'project.points'; 54 - const PANEL_WORKBOARD = 'project.workboard'; 55 - const PANEL_MEMBERS = 'project.members'; 56 - const PANEL_MANAGE = 'project.manage'; 57 - const PANEL_MILESTONES = 'project.milestones'; 58 - const PANEL_SUBPROJECTS = 'project.subprojects'; 52 + const ITEM_PROFILE = 'project.profile'; 53 + const ITEM_POINTS = 'project.points'; 54 + const ITEM_WORKBOARD = 'project.workboard'; 55 + const ITEM_MEMBERS = 'project.members'; 56 + const ITEM_MANAGE = 'project.manage'; 57 + const ITEM_MILESTONES = 'project.milestones'; 58 + const ITEM_SUBPROJECTS = 'project.subprojects'; 59 59 60 60 public static function initializeNewProject(PhabricatorUser $actor) { 61 61 $app = id(new PhabricatorApplicationQuery())
+14 -12
src/applications/search/editor/PhabricatorProfileMenuEditEngine.php
··· 7 7 8 8 private $menuEngine; 9 9 private $profileObject; 10 - private $newPanelConfiguration; 10 + private $newMenuItemConfiguration; 11 11 private $isBuiltin; 12 12 13 13 public function isEngineConfigurable() { ··· 32 32 return $this->profileObject; 33 33 } 34 34 35 - public function setNewPanelConfiguration( 35 + public function setNewMenuItemConfiguration( 36 36 PhabricatorProfileMenuItemConfiguration $configuration) { 37 - $this->newPanelConfiguration = $configuration; 37 + $this->newMenuItemConfiguration = $configuration; 38 38 return $this; 39 39 } 40 40 41 - public function getNewPanelConfiguration() { 42 - return $this->newPanelConfiguration; 41 + public function getNewMenuItemConfiguration() { 42 + return $this->newMenuItemConfiguration; 43 43 } 44 44 45 45 public function setIsBuiltin($is_builtin) { ··· 52 52 } 53 53 54 54 public function getEngineName() { 55 - return pht('Profile Panels'); 55 + return pht('Profile Menu Items'); 56 56 } 57 57 58 58 public function getSummaryHeader() { 59 - return pht('Edit Profile Panel Configurations'); 59 + return pht('Edit Profile Menu Item Configurations'); 60 60 } 61 61 62 62 public function getSummaryText() { ··· 68 68 } 69 69 70 70 protected function newEditableObject() { 71 - if (!$this->newPanelConfiguration) { 71 + if (!$this->newMenuItemConfiguration) { 72 72 throw new Exception( 73 - pht('Profile panels can not be generated without an object context.')); 73 + pht( 74 + 'Profile menu items can not be generated without an '. 75 + 'object context.')); 74 76 } 75 77 76 - return clone $this->newPanelConfiguration; 78 + return clone $this->newMenuItemConfiguration; 77 79 } 78 80 79 81 protected function newObjectQuery() { ··· 121 123 } 122 124 123 125 protected function buildCustomEditFields($object) { 124 - $panel = $object->getPanel(); 125 - $fields = $panel->buildEditEngineFields($object); 126 + $item = $object->getMenuItem(); 127 + $fields = $item->buildEditEngineFields($object); 126 128 127 129 $type_property = 128 130 PhabricatorProfileMenuItemConfigurationTransaction::TYPE_PROPERTY;
+1 -1
src/applications/search/editor/PhabricatorProfileMenuEditor.php
··· 60 60 case PhabricatorProfileMenuItemConfigurationTransaction::TYPE_PROPERTY: 61 61 $key = $xaction->getMetadataValue('property.key'); 62 62 $value = $xaction->getNewValue(); 63 - $object->getMenuItemProperty($key, $value); 63 + $object->setMenuItemProperty($key, $value); 64 64 return; 65 65 case PhabricatorProfileMenuItemConfigurationTransaction::TYPE_ORDER: 66 66 $object->setMenuItemOrder($xaction->getNewValue());
+170 -172
src/applications/search/engine/PhabricatorProfileMenuEngine.php
··· 4 4 5 5 private $viewer; 6 6 private $profileObject; 7 - private $panels; 8 - private $defaultPanel; 7 + private $items; 8 + private $defaultItem; 9 9 private $controller; 10 10 private $navigation; 11 11 ··· 36 36 return $this->controller; 37 37 } 38 38 39 - private function setDefaultPanel( 40 - PhabricatorProfileMenuItemConfiguration $default_panel) { 41 - $this->defaultPanel = $default_panel; 39 + private function setDefaultItem( 40 + PhabricatorProfileMenuItemConfiguration $default_item) { 41 + $this->defaultItem = $default_item; 42 42 return $this; 43 43 } 44 44 45 - public function getDefaultPanel() { 46 - $this->loadPanels(); 47 - return $this->defaultPanel; 45 + public function getDefaultItem() { 46 + $this->loadItems(); 47 + return $this->defaultItem; 48 48 } 49 49 50 - abstract protected function getPanelURI($path); 50 + abstract protected function getItemURI($path); 51 51 52 52 abstract protected function isMenuEngineConfigurable(); 53 53 ··· 59 59 60 60 $request = $controller->getRequest(); 61 61 62 - $panel_action = $request->getURIData('panelAction'); 62 + $item_action = $request->getURIData('itemAction'); 63 63 64 64 // If the engine is not configurable, don't respond to any of the editing 65 65 // or configuration routes. 66 66 if (!$this->isMenuEngineConfigurable()) { 67 - switch ($panel_action) { 67 + switch ($item_action) { 68 68 case 'view': 69 69 break; 70 70 default: ··· 72 72 } 73 73 } 74 74 75 - $panel_id = $request->getURIData('panelID'); 75 + $item_id = $request->getURIData('itemID'); 76 + $item_list = $this->loadItems(); 76 77 77 - $panel_list = $this->loadPanels(); 78 - 79 - $selected_panel = null; 80 - if (strlen($panel_id)) { 81 - $panel_id_int = (int)$panel_id; 82 - foreach ($panel_list as $panel) { 83 - if ($panel_id_int) { 84 - if ((int)$panel->getID() === $panel_id_int) { 85 - $selected_panel = $panel; 78 + $selected_item = null; 79 + if (strlen($item_id)) { 80 + $item_id_int = (int)$item_id; 81 + foreach ($item_list as $item) { 82 + if ($item_id_int) { 83 + if ((int)$item->getID() === $item_id_int) { 84 + $selected_item = $item; 86 85 break; 87 86 } 88 87 } 89 88 90 - $builtin_key = $panel->getBuiltinKey(); 91 - if ($builtin_key === (string)$panel_id) { 92 - $selected_panel = $panel; 89 + $builtin_key = $item->getBuiltinKey(); 90 + if ($builtin_key === (string)$item_id) { 91 + $selected_item = $item; 93 92 break; 94 93 } 95 94 } 96 95 } 97 96 98 - switch ($panel_action) { 97 + switch ($item_action) { 99 98 case 'view': 100 99 case 'info': 101 100 case 'hide': 102 101 case 'default': 103 102 case 'builtin': 104 - if (!$selected_panel) { 103 + if (!$selected_item) { 105 104 return new Aphront404Response(); 106 105 } 107 106 break; 108 107 } 109 108 110 109 $navigation = $this->buildNavigation(); 111 - $navigation->selectFilter('panel.configure'); 110 + $navigation->selectFilter('item.configure'); 112 111 113 112 $crumbs = $controller->buildApplicationCrumbsForEditEngine(); 114 113 115 - switch ($panel_action) { 114 + switch ($item_action) { 116 115 case 'view': 117 - $content = $this->buildPanelViewContent($selected_panel); 116 + $content = $this->buildItemViewContent($selected_item); 118 117 break; 119 118 case 'configure': 120 - $content = $this->buildPanelConfigureContent($panel_list); 119 + $content = $this->buildItemConfigureContent($item_list); 121 120 $crumbs->addTextCrumb(pht('Configure Menu')); 122 121 break; 123 122 case 'reorder': 124 - $content = $this->buildPanelReorderContent($panel_list); 123 + $content = $this->buildItemReorderContent($item_list); 125 124 break; 126 125 case 'new': 127 - $panel_key = $request->getURIData('panelKey'); 128 - $content = $this->buildPanelNewContent($panel_key); 126 + $item_key = $request->getURIData('itemKey'); 127 + $content = $this->buildItemNewContent($item_key); 129 128 break; 130 129 case 'builtin': 131 - $content = $this->buildPanelBuiltinContent($selected_panel); 130 + $content = $this->buildItemBuiltinContent($selected_item); 132 131 break; 133 132 case 'hide': 134 - $content = $this->buildPanelHideContent($selected_panel); 133 + $content = $this->buildItemHideContent($selected_item); 135 134 break; 136 135 case 'default': 137 - $content = $this->buildPanelDefaultContent( 138 - $selected_panel, 139 - $panel_list); 136 + $content = $this->buildItemDefaultContent( 137 + $selected_item, 138 + $item_list); 140 139 break; 141 140 case 'edit': 142 - $content = $this->buildPanelEditContent(); 141 + $content = $this->buildItemEditContent(); 143 142 break; 144 143 default: 145 144 throw new Exception( 146 145 pht( 147 - 'Unsupported panel action "%s".', 148 - $panel_action)); 146 + 'Unsupported item action "%s".', 147 + $item_action)); 149 148 } 150 149 151 150 if ($content instanceof AphrontResponse) { ··· 170 169 171 170 $nav = id(new AphrontSideNavFilterView()) 172 171 ->setIsProfileMenu(true) 173 - ->setBaseURI(new PhutilURI($this->getPanelURI(''))); 172 + ->setBaseURI(new PhutilURI($this->getItemURI(''))); 174 173 175 - $panels = $this->getPanels(); 174 + $menu_items = $this->getItems(); 176 175 177 - foreach ($panels as $panel) { 178 - if ($panel->isDisabled()) { 176 + foreach ($menu_items as $menu_item) { 177 + if ($menu_item->isDisabled()) { 179 178 continue; 180 179 } 181 180 182 - $items = $panel->buildNavigationMenuItems(); 181 + $items = $menu_item->buildNavigationMenuItems(); 183 182 foreach ($items as $item) { 184 183 $this->validateNavigationMenuItem($item); 185 184 } 186 185 187 - // If the panel produced only a single item which does not otherwise 186 + // If the item produced only a single item which does not otherwise 188 187 // have a key, try to automatically assign it a reasonable key. This 189 188 // makes selecting the correct item simpler. 190 189 191 190 if (count($items) == 1) { 192 191 $item = head($items); 193 192 if ($item->getKey() === null) { 194 - $builtin_key = $panel->getBuiltinKey(); 195 - $panel_phid = $panel->getPHID(); 193 + $builtin_key = $menu_item->getBuiltinKey(); 194 + $item_phid = $menu_item->getPHID(); 196 195 if ($builtin_key !== null) { 197 196 $item->setKey($builtin_key); 198 - } else if ($panel_phid !== null) { 199 - $item->setKey($panel_phid); 197 + } else if ($item_phid !== null) { 198 + $item->setKey($item_phid); 200 199 } 201 200 } 202 201 } ··· 217 216 return $this->navigation; 218 217 } 219 218 220 - private function getPanels() { 221 - if ($this->panels === null) { 222 - $this->panels = $this->loadPanels(); 219 + private function getItems() { 220 + if ($this->items === null) { 221 + $this->items = $this->loadItems(); 223 222 } 224 223 225 - return $this->panels; 224 + return $this->items; 226 225 } 227 226 228 - private function loadPanels() { 227 + private function loadItems() { 229 228 $viewer = $this->getViewer(); 230 229 $object = $this->getProfileObject(); 231 230 232 - $panels = $this->loadBuiltinProfilePanels(); 231 + $items = $this->loadBuiltinProfileItems(); 233 232 234 - $stored_panels = id(new PhabricatorProfileMenuItemConfigurationQuery()) 233 + $stored_items = id(new PhabricatorProfileMenuItemConfigurationQuery()) 235 234 ->setViewer($viewer) 236 235 ->withProfilePHIDs(array($object->getPHID())) 237 236 ->execute(); 238 237 239 - foreach ($stored_panels as $stored_panel) { 240 - $impl = $stored_panel->getPanel(); 238 + foreach ($stored_items as $stored_item) { 239 + $impl = $stored_item->getMenuItem(); 241 240 $impl->setViewer($viewer); 242 241 } 243 242 244 - // Merge the stored panels into the builtin panels. If a builtin panel has 243 + // Merge the stored items into the builtin items. If a builtin item has 245 244 // a stored version, replace the defaults with the stored changes. 246 - foreach ($stored_panels as $stored_panel) { 247 - if (!$stored_panel->shouldEnableForObject($object)) { 245 + foreach ($stored_items as $stored_item) { 246 + if (!$stored_item->shouldEnableForObject($object)) { 248 247 continue; 249 248 } 250 249 251 - $builtin_key = $stored_panel->getBuiltinKey(); 250 + $builtin_key = $stored_item->getBuiltinKey(); 252 251 if ($builtin_key !== null) { 253 252 // If this builtin actually exists, replace the builtin with the 254 253 // stored configuration. Otherwise, we're just going to drop the 255 254 // stored config: it corresponds to an out-of-date or uninstalled 256 - // panel. 257 - if (isset($panels[$builtin_key])) { 258 - $panels[$builtin_key] = $stored_panel; 255 + // item. 256 + if (isset($items[$builtin_key])) { 257 + $items[$builtin_key] = $stored_item; 259 258 } else { 260 259 continue; 261 260 } 262 261 } else { 263 - $panels[] = $stored_panel; 262 + $items[] = $stored_item; 264 263 } 265 264 } 266 265 267 - $panels = msort($panels, 'getSortKey'); 266 + $items = msort($items, 'getSortKey'); 268 267 269 268 // Normalize keys since callers shouldn't rely on this array being 270 269 // partially keyed. 271 - $panels = array_values($panels); 270 + $items = array_values($items); 272 271 273 272 274 - // Make sure exactly one valid panel is marked as default. 273 + // Make sure exactly one valid item is marked as default. 275 274 $default = null; 276 275 $first = null; 277 - foreach ($panels as $panel) { 278 - if (!$panel->canMakeDefault()) { 276 + foreach ($items as $item) { 277 + if (!$item->canMakeDefault()) { 279 278 continue; 280 279 } 281 280 282 - if ($panel->isDefault()) { 283 - $default = $panel; 281 + if ($item->isDefault()) { 282 + $default = $item; 284 283 break; 285 284 } 286 285 287 286 if ($first === null) { 288 - $first = $panel; 287 + $first = $item; 289 288 } 290 289 } 291 290 ··· 294 293 } 295 294 296 295 if ($default) { 297 - $this->setDefaultPanel($default); 296 + $this->setDefaultItem($default); 298 297 } 299 298 300 - return $panels; 299 + return $items; 301 300 } 302 301 303 - private function loadBuiltinProfilePanels() { 302 + private function loadBuiltinProfileItems() { 304 303 $object = $this->getProfileObject(); 305 - $builtins = $this->getBuiltinProfilePanels($object); 304 + $builtins = $this->getBuiltinProfileItems($object); 306 305 307 - $panels = PhabricatorProfilePanel::getAllPanels(); 306 + $items = PhabricatorProfileMenuItem::getAllMenuItems(); 308 307 $viewer = $this->getViewer(); 309 308 310 309 $order = 1; ··· 315 314 if (!$builtin_key) { 316 315 throw new Exception( 317 316 pht( 318 - 'Object produced a builtin panel with no builtin panel key! '. 319 - 'Builtin panels must have a unique key.')); 317 + 'Object produced a builtin item with no builtin item key! '. 318 + 'Builtin items must have a unique key.')); 320 319 } 321 320 322 321 if (isset($map[$builtin_key])) { 323 322 throw new Exception( 324 323 pht( 325 - 'Object produced two panels with the same builtin key ("%s"). '. 326 - 'Each panel must have a unique builtin key.', 324 + 'Object produced two items with the same builtin key ("%s"). '. 325 + 'Each item must have a unique builtin key.', 327 326 $builtin_key)); 328 327 } 329 328 330 - $panel_key = $builtin->getMenuItemKey(); 329 + $item_key = $builtin->getMenuItemKey(); 331 330 332 - $panel = idx($panels, $panel_key); 333 - if (!$panel) { 331 + $item = idx($items, $item_key); 332 + if (!$item) { 334 333 throw new Exception( 335 334 pht( 336 - 'Builtin panel ("%s") specifies a bad panel key ("%s"); there '. 337 - 'is no corresponding panel implementation available.', 335 + 'Builtin item ("%s") specifies a bad item key ("%s"); there '. 336 + 'is no corresponding item implementation available.', 338 337 $builtin_key, 339 - $panel_key)); 338 + $item_key)); 340 339 } 341 340 342 - $panel = clone $panel; 343 - $panel->setViewer($viewer); 341 + $item = clone $item; 342 + $item->setViewer($viewer); 344 343 345 344 $builtin 346 345 ->setProfilePHID($object->getPHID()) 347 - ->attachPanel($panel) 346 + ->attachMenuItem($item) 348 347 ->attachProfileObject($object) 349 348 ->setMenuItemOrder($order); 350 349 ··· 437 436 } 438 437 439 438 public function getConfigureURI() { 440 - return $this->getPanelURI('configure/'); 439 + return $this->getItemURI('configure/'); 441 440 } 442 441 443 - private function buildPanelReorderContent(array $panels) { 442 + private function buildItemReorderContent(array $items) { 444 443 $viewer = $this->getViewer(); 445 444 $object = $this->getProfileObject(); 446 445 ··· 459 458 $by_builtin = array(); 460 459 $by_id = array(); 461 460 462 - foreach ($panels as $key => $panel) { 463 - $id = $panel->getID(); 461 + foreach ($items as $key => $item) { 462 + $id = $item->getID(); 464 463 if ($id) { 465 464 $by_id[$id] = $key; 466 465 continue; 467 466 } 468 467 469 - $builtin_key = $panel->getBuiltinKey(); 468 + $builtin_key = $item->getBuiltinKey(); 470 469 if ($builtin_key) { 471 470 $by_builtin[$builtin_key] = $key; 472 471 continue; ··· 485 484 } 486 485 } 487 486 488 - $panels = array_select_keys($panels, $key_order) + $panels; 487 + $items = array_select_keys($items, $key_order) + $items; 489 488 490 489 $type_order = 491 490 PhabricatorProfileMenuItemConfigurationTransaction::TYPE_ORDER; 492 491 493 492 $order = 1; 494 - foreach ($panels as $panel) { 493 + foreach ($items as $item) { 495 494 $xactions = array(); 496 495 497 496 $xactions[] = id(new PhabricatorProfileMenuItemConfigurationTransaction()) ··· 503 502 ->setActor($viewer) 504 503 ->setContinueOnMissingFields(true) 505 504 ->setContinueOnNoEffect(true) 506 - ->applyTransactions($panel, $xactions); 505 + ->applyTransactions($item, $xactions); 507 506 508 507 $order++; 509 508 } ··· 513 512 } 514 513 515 514 516 - private function buildPanelConfigureContent(array $panels) { 515 + private function buildItemConfigureContent(array $items) { 517 516 $viewer = $this->getViewer(); 518 517 $object = $this->getProfileObject(); 519 518 ··· 528 527 'reorder-profile-menu-items', 529 528 array( 530 529 'listID' => $list_id, 531 - 'orderURI' => $this->getPanelURI('reorder/'), 530 + 'orderURI' => $this->getItemURI('reorder/'), 532 531 )); 533 532 534 533 $list = id(new PHUIObjectItemListView()) 535 534 ->setID($list_id); 536 535 537 - foreach ($panels as $panel) { 538 - $id = $panel->getID(); 539 - $builtin_key = $panel->getBuiltinKey(); 536 + foreach ($items as $item) { 537 + $id = $item->getID(); 538 + $builtin_key = $item->getBuiltinKey(); 540 539 541 540 $can_edit = PhabricatorPolicyFilter::hasCapability( 542 541 $viewer, 543 - $panel, 542 + $item, 544 543 PhabricatorPolicyCapability::CAN_EDIT); 545 544 546 - $item = id(new PHUIObjectItemView()); 545 + $view = id(new PHUIObjectItemView()); 547 546 548 - $name = $panel->getDisplayName(); 549 - $type = $panel->getPanelTypeName(); 547 + $name = $item->getDisplayName(); 548 + $type = $item->getMenuItemTypeName(); 550 549 if (!strlen(trim($name))) { 551 550 $name = pht('Untitled "%s" Item', $type); 552 551 } 553 552 554 - $item->setHeader($name); 555 - $item->addAttribute($type); 553 + $view->setHeader($name); 554 + $view->addAttribute($type); 556 555 557 556 if ($can_edit) { 558 - $item 557 + $view 559 558 ->setGrippable(true) 560 559 ->addSigil('profile-menu-item') 561 560 ->setMetadata( ··· 564 563 )); 565 564 566 565 if ($id) { 567 - $default_uri = $this->getPanelURI("default/{$id}/"); 566 + $default_uri = $this->getItemURI("default/{$id}/"); 568 567 } else { 569 - $default_uri = $this->getPanelURI("default/{$builtin_key}/"); 568 + $default_uri = $this->getItemURI("default/{$builtin_key}/"); 570 569 } 571 570 572 - if ($panel->isDefault()) { 571 + if ($item->isDefault()) { 573 572 $default_icon = 'fa-thumb-tack green'; 574 573 $default_text = pht('Current Default'); 575 - } else if ($panel->canMakeDefault()) { 574 + } else if ($item->canMakeDefault()) { 576 575 $default_icon = 'fa-thumb-tack'; 577 576 $default_text = pht('Make Default'); 578 577 } else { ··· 580 579 } 581 580 582 581 if ($default_text !== null) { 583 - $item->addAction( 582 + $view->addAction( 584 583 id(new PHUIListItemView()) 585 584 ->setHref($default_uri) 586 585 ->setWorkflow(true) ··· 589 588 } 590 589 591 590 if ($id) { 592 - $item->setHref($this->getPanelURI("edit/{$id}/")); 593 - $hide_uri = $this->getPanelURI("hide/{$id}/"); 591 + $view->setHref($this->getItemURI("edit/{$id}/")); 592 + $hide_uri = $this->getItemURI("hide/{$id}/"); 594 593 } else { 595 - $item->setHref($this->getPanelURI("builtin/{$builtin_key}/")); 596 - $hide_uri = $this->getPanelURI("hide/{$builtin_key}/"); 594 + $view->setHref($this->getItemURI("builtin/{$builtin_key}/")); 595 + $hide_uri = $this->getItemURI("hide/{$builtin_key}/"); 597 596 } 598 597 599 - if ($panel->isDisabled()) { 598 + if ($item->isDisabled()) { 600 599 $hide_icon = 'fa-plus'; 601 600 $hide_text = pht('Enable'); 602 - } else if ($panel->getBuiltinKey() !== null) { 601 + } else if ($item->getBuiltinKey() !== null) { 603 602 $hide_icon = 'fa-times'; 604 603 $hide_text = pht('Disable'); 605 604 } else { ··· 607 606 $hide_text = pht('Delete'); 608 607 } 609 608 610 - $can_disable = $panel->canHideMenuItem(); 609 + $can_disable = $item->canHideMenuItem(); 611 610 612 - $item->addAction( 611 + $view->addAction( 613 612 id(new PHUIListItemView()) 614 613 ->setHref($hide_uri) 615 614 ->setWorkflow(true) ··· 618 617 ->setIcon($hide_icon)); 619 618 } 620 619 621 - if ($panel->isDisabled()) { 622 - $item->setDisabled(true); 620 + if ($item->isDisabled()) { 621 + $view->setDisabled(true); 623 622 } 624 623 625 - $list->addItem($item); 624 + $list->addItem($view); 626 625 } 627 626 628 627 $action_view = id(new PhabricatorActionListView()) 629 628 ->setUser($viewer); 630 629 631 - $panel_types = PhabricatorProfilePanel::getAllPanels(); 630 + $item_types = PhabricatorProfileMenuItem::getAllMenuItems(); 632 631 633 632 $action_view->addAction( 634 633 id(new PhabricatorActionView()) 635 634 ->setLabel(true) 636 635 ->setName(pht('Add New Menu Item...'))); 637 636 638 - foreach ($panel_types as $panel_type) { 639 - if (!$panel_type->canAddToObject($object)) { 637 + foreach ($item_types as $item_type) { 638 + if (!$item_type->canAddToObject($object)) { 640 639 continue; 641 640 } 642 641 643 - $panel_key = $panel_type->getPanelKey(); 642 + $item_key = $item_type->getMenuItemKey(); 644 643 645 644 $action_view->addAction( 646 645 id(new PhabricatorActionView()) 647 - ->setIcon($panel_type->getPanelTypeIcon()) 648 - ->setName($panel_type->getPanelTypeName()) 649 - ->setHref($this->getPanelURI("new/{$panel_key}/"))); 646 + ->setIcon($item_type->getMenuItemTypeIcon()) 647 + ->setName($item_type->getMenuItemTypeName()) 648 + ->setHref($this->getItemURI("new/{$item_key}/"))); 650 649 } 651 650 652 651 $action_view->addAction( ··· 682 681 return $box; 683 682 } 684 683 685 - private function buildPanelNewContent($panel_key) { 686 - $panel_types = PhabricatorProfilePanel::getAllPanels(); 687 - $panel_type = idx($panel_types, $panel_key); 688 - if (!$panel_type) { 684 + private function buildItemNewContent($item_key) { 685 + $item_types = PhabricatorProfileMenuItem::getAllMenuItems(); 686 + $item_type = idx($item_types, $item_key); 687 + if (!$item_type) { 689 688 return new Aphront404Response(); 690 689 } 691 690 692 691 $object = $this->getProfileObject(); 693 - if (!$panel_type->canAddToObject($object)) { 692 + if (!$item_type->canAddToObject($object)) { 694 693 return new Aphront404Response(); 695 694 } 696 695 697 - $configuration = 698 - PhabricatorProfileMenuItemConfiguration::initializeNewPanelConfiguration( 699 - $object, 700 - $panel_type); 696 + $configuration = PhabricatorProfileMenuItemConfiguration::initializeNewItem( 697 + $object, 698 + $item_type); 701 699 702 700 $viewer = $this->getViewer(); 703 701 ··· 711 709 return id(new PhabricatorProfileMenuEditEngine()) 712 710 ->setMenuEngine($this) 713 711 ->setProfileObject($object) 714 - ->setNewPanelConfiguration($configuration) 712 + ->setNewMenuItemConfiguration($configuration) 715 713 ->setController($controller) 716 714 ->buildResponse(); 717 715 } 718 716 719 - private function buildPanelEditContent() { 717 + private function buildItemEditContent() { 720 718 $viewer = $this->getViewer(); 721 719 $object = $this->getProfileObject(); 722 720 $controller = $this->getController(); ··· 728 726 ->buildResponse(); 729 727 } 730 728 731 - private function buildPanelBuiltinContent( 729 + private function buildItemBuiltinContent( 732 730 PhabricatorProfileMenuItemConfiguration $configuration) { 733 731 734 - // If this builtin panel has already been persisted, redirect to the 732 + // If this builtin item has already been persisted, redirect to the 735 733 // edit page. 736 734 $id = $configuration->getID(); 737 735 if ($id) { 738 736 return id(new AphrontRedirectResponse()) 739 - ->setURI($this->getPanelURI("edit/{$id}/")); 737 + ->setURI($this->getItemURI("edit/{$id}/")); 740 738 } 741 739 742 - // Otherwise, act like we're creating a new panel, we're just starting 740 + // Otherwise, act like we're creating a new item, we're just starting 743 741 // with the builtin template. 744 742 $viewer = $this->getViewer(); 745 743 ··· 755 753 ->setIsBuiltin(true) 756 754 ->setMenuEngine($this) 757 755 ->setProfileObject($object) 758 - ->setNewPanelConfiguration($configuration) 756 + ->setNewMenuItemConfiguration($configuration) 759 757 ->setController($controller) 760 758 ->buildResponse(); 761 759 } 762 760 763 - private function buildPanelHideContent( 761 + private function buildItemHideContent( 764 762 PhabricatorProfileMenuItemConfiguration $configuration) { 765 763 766 764 $controller = $this->getController(); ··· 774 772 775 773 if (!$configuration->canHideMenuItem()) { 776 774 return $controller->newDialog() 777 - ->setTitle(pht('Mandatory Panel')) 775 + ->setTitle(pht('Mandatory Item')) 778 776 ->appendParagraph( 779 - pht('This panel is very important, and can not be disabled.')) 777 + pht('This menu item is very important, and can not be disabled.')) 780 778 ->addCancelButton($this->getConfigureURI()); 781 779 } 782 780 ··· 837 835 ->addSubmitButton($button); 838 836 } 839 837 840 - private function buildPanelDefaultContent( 838 + private function buildItemDefaultContent( 841 839 PhabricatorProfileMenuItemConfiguration $configuration, 842 - array $panels) { 840 + array $items) { 843 841 844 842 $controller = $this->getController(); 845 843 $request = $controller->getRequest(); ··· 894 892 ->addSubmitButton(pht('Make Default')); 895 893 } 896 894 897 - protected function newPanel() { 895 + protected function newItem() { 898 896 return PhabricatorProfileMenuItemConfiguration::initializeNewBuiltin(); 899 897 } 900 898 ··· 903 901 $request = $controller->getRequest(); 904 902 $viewer = $request->getViewer(); 905 903 906 - $panels = $this->loadPanels(); 904 + $items = $this->loadItems(); 907 905 908 - // To adjust the default panel, we first change any existing panels that 909 - // are marked as defaults to "visible", then make the new default panel 906 + // To adjust the default item, we first change any existing items that 907 + // are marked as defaults to "visible", then make the new default item 910 908 // the default. 911 909 912 910 $default = array(); 913 911 $visible = array(); 914 912 915 - foreach ($panels as $panel) { 916 - $builtin_key = $panel->getBuiltinKey(); 917 - $id = $panel->getID(); 913 + foreach ($items as $item) { 914 + $builtin_key = $item->getBuiltinKey(); 915 + $id = $item->getID(); 918 916 919 917 $is_target = 920 918 (($builtin_key !== null) && ($builtin_key === $key)) || 921 919 (($id !== null) && ((int)$id === (int)$key)); 922 920 923 921 if ($is_target) { 924 - if (!$panel->isDefault()) { 925 - $default[] = $panel; 922 + if (!$item->isDefault()) { 923 + $default[] = $item; 926 924 } 927 925 } else { 928 - if ($panel->isDefault()) { 929 - $visible[] = $panel; 926 + if ($item->isDefault()) { 927 + $visible[] = $item; 930 928 } 931 929 } 932 930 } ··· 943 941 ); 944 942 945 943 foreach ($apply as $group) { 946 - list($value, $panels) = $group; 947 - foreach ($panels as $panel) { 944 + list($value, $items) = $group; 945 + foreach ($items as $item) { 948 946 $xactions = array(); 949 947 950 948 $xactions[] = ··· 957 955 ->setActor($viewer) 958 956 ->setContinueOnMissingFields(true) 959 957 ->setContinueOnNoEffect(true) 960 - ->applyTransactions($panel, $xactions); 958 + ->applyTransactions($item, $xactions); 961 959 } 962 960 } 963 961
+5 -5
src/applications/search/profilepanel/PhabricatorApplicationProfilePanel.php src/applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php
··· 1 1 <?php 2 2 3 - final class PhabricatorApplicationProfilePanel 4 - extends PhabricatorProfilePanel { 3 + final class PhabricatorApplicationProfileMenuItem 4 + extends PhabricatorProfileMenuItem { 5 5 6 - const PANELKEY = 'application'; 6 + const MENUITEMKEY = 'application'; 7 7 8 - public function getPanelTypeIcon() { 8 + public function getMenuItemTypeIcon() { 9 9 return 'fa-globe'; 10 10 } 11 11 12 - public function getPanelTypeName() { 12 + public function getMenuItemTypeName() { 13 13 return pht('Application'); 14 14 } 15 15
+5 -5
src/applications/search/profilepanel/PhabricatorDividerProfilePanel.php src/applications/search/menuitem/PhabricatorDividerProfileMenuItem.php
··· 1 1 <?php 2 2 3 - final class PhabricatorDividerProfilePanel 4 - extends PhabricatorProfilePanel { 3 + final class PhabricatorDividerProfileMenuItem 4 + extends PhabricatorProfileMenuItem { 5 5 6 - const PANELKEY = 'divider'; 6 + const MENUITEMKEY = 'divider'; 7 7 8 - public function getPanelTypeIcon() { 8 + public function getMenuItemTypeIcon() { 9 9 return 'fa-minus'; 10 10 } 11 11 12 - public function getPanelTypeName() { 12 + public function getMenuItemTypeName() { 13 13 return pht('Divider'); 14 14 } 15 15
+7 -7
src/applications/search/profilepanel/PhabricatorLinkProfilePanel.php src/applications/search/menuitem/PhabricatorLinkProfileMenuItem.php
··· 1 1 <?php 2 2 3 - final class PhabricatorLinkProfilePanel 4 - extends PhabricatorProfilePanel { 3 + final class PhabricatorLinkProfileMenuItem 4 + extends PhabricatorProfileMenuItem { 5 5 6 - const PANELKEY = 'link'; 6 + const MENUITEMKEY = 'link'; 7 7 8 - public function getPanelTypeIcon() { 8 + public function getMenuItemTypeIcon() { 9 9 return 'fa-link'; 10 10 } 11 11 12 - public function getPanelTypeName() { 12 + public function getMenuItemTypeName() { 13 13 return pht('Link'); 14 14 } 15 15 ··· 38 38 id(new PhabricatorIconSetEditField()) 39 39 ->setKey('icon') 40 40 ->setLabel(pht('Icon')) 41 - ->setIconSet(new PhabricatorProfilePanelIconSet()) 41 + ->setIconSet(new PhabricatorProfileMenuItemIconSet()) 42 42 ->setValue($this->getLinkIcon($config)), 43 43 ); 44 44 } ··· 73 73 $href = '#'; 74 74 } 75 75 76 - $icon_object = id(new PhabricatorProfilePanelIconSet()) 76 + $icon_object = id(new PhabricatorProfileMenuItemIconSet()) 77 77 ->getIcon($icon); 78 78 if ($icon_object) { 79 79 $icon_class = $icon_object->getIcon();
+6 -6
src/applications/search/profilepanel/PhabricatorMotivatorProfilePanel.php src/applications/search/menuitem/PhabricatorMotivatorProfileMenuItem.php
··· 1 1 <?php 2 2 3 - final class PhabricatorMotivatorProfilePanel 4 - extends PhabricatorProfilePanel { 3 + final class PhabricatorMotivatorProfileMenuItem 4 + extends PhabricatorProfileMenuItem { 5 5 6 - const PANELKEY = 'motivator'; 6 + const MENUITEMKEY = 'motivator'; 7 7 8 - public function getPanelTypeIcon() { 8 + public function getMenuItemTypeIcon() { 9 9 return 'fa-coffee'; 10 10 } 11 11 12 - public function getPanelTypeName() { 12 + public function getMenuItemTypeName() { 13 13 return pht('Motivator'); 14 14 } 15 15 ··· 36 36 ->setValue( 37 37 pht( 38 38 'Motivate your team with inspirational quotes from great minds. '. 39 - 'This panel shows a new quote every day.')), 39 + 'This menu item shows a new quote every day.')), 40 40 id(new PhabricatorSelectEditField()) 41 41 ->setKey('source') 42 42 ->setLabel(pht('Source'))
+8 -8
src/applications/search/profilepanel/PhabricatorProfilePanel.php src/applications/search/menuitem/PhabricatorProfileMenuItem.php
··· 1 1 <?php 2 2 3 - abstract class PhabricatorProfilePanel extends Phobject { 3 + abstract class PhabricatorProfileMenuItem extends Phobject { 4 4 5 5 private $viewer; 6 6 ··· 12 12 abstract protected function newNavigationMenuItems( 13 13 PhabricatorProfileMenuItemConfiguration $config); 14 14 15 - public function getPanelTypeIcon() { 15 + public function getMenuItemTypeIcon() { 16 16 return null; 17 17 } 18 18 19 - abstract public function getPanelTypeName(); 19 + abstract public function getMenuItemTypeName(); 20 20 21 21 abstract public function getDisplayName( 22 22 PhabricatorProfileMenuItemConfiguration $config); ··· 34 34 return true; 35 35 } 36 36 37 - public function canHidePanel( 37 + public function canHideMenuItem( 38 38 PhabricatorProfileMenuItemConfiguration $config) { 39 39 return true; 40 40 } ··· 53 53 return $this->viewer; 54 54 } 55 55 56 - final public function getPanelKey() { 57 - return $this->getPhobjectClassConstant('PANELKEY'); 56 + final public function getMenuItemKey() { 57 + return $this->getPhobjectClassConstant('MENUITEMKEY'); 58 58 } 59 59 60 - final public static function getAllPanels() { 60 + final public static function getAllMenuItems() { 61 61 return id(new PhutilClassMapQuery()) 62 62 ->setAncestorClass(__CLASS__) 63 - ->setUniqueMethod('getPanelKey') 63 + ->setUniqueMethod('getMenuItemKey') 64 64 ->execute(); 65 65 } 66 66
+2 -2
src/applications/search/profilepanel/PhabricatorProfilePanelIconSet.php src/applications/search/menuitem/PhabricatorProfileMenuItemIconSet.php
··· 1 1 <?php 2 2 3 - final class PhabricatorProfilePanelIconSet 3 + final class PhabricatorProfileMenuItemIconSet 4 4 extends PhabricatorIconSet { 5 5 6 - const ICONSETKEY = 'profilepanel'; 6 + const ICONSETKEY = 'profilemenuitem'; 7 7 8 8 public function getSelectIconTitleText() { 9 9 return pht('Choose Item Icon');
+10 -10
src/applications/search/query/PhabricatorProfileMenuItemConfigurationQuery.php
··· 58 58 } 59 59 60 60 protected function willFilterPage(array $page) { 61 - $panels = PhabricatorProfilePanel::getAllPanels(); 62 - foreach ($page as $key => $panel) { 63 - $panel_type = idx($panels, $panel->getMenuItemKey()); 64 - if (!$panel_type) { 65 - $this->didRejectResult($panel); 61 + $items = PhabricatorProfileMenuItem::getAllMenuItems(); 62 + foreach ($page as $key => $item) { 63 + $item_type = idx($items, $item->getMenuItemKey()); 64 + if (!$item_type) { 65 + $this->didRejectResult($item); 66 66 unset($page[$key]); 67 67 continue; 68 68 } 69 - $panel->attachPanel($panel_type); 69 + $item->attachMenuItem($item_type); 70 70 } 71 71 72 72 if (!$page) { ··· 82 82 ->execute(); 83 83 $profiles = mpull($profiles, null, 'getPHID'); 84 84 85 - foreach ($page as $key => $panel) { 86 - $profile = idx($profiles, $panel->getProfilePHID()); 85 + foreach ($page as $key => $item) { 86 + $profile = idx($profiles, $item->getProfilePHID()); 87 87 if (!$profile) { 88 - $this->didRejectResult($panel); 88 + $this->didRejectResult($item); 89 89 unset($page[$key]); 90 90 continue; 91 91 } 92 - $panel->attachProfileObject($profile); 92 + $item->attachProfileObject($profile); 93 93 } 94 94 95 95 return $page;
+16 -16
src/applications/search/storage/PhabricatorProfileMenuItemConfiguration.php
··· 15 15 protected $menuItemProperties = array(); 16 16 17 17 private $profileObject = self::ATTACHABLE; 18 - private $panel = self::ATTACHABLE; 18 + private $menuItem = self::ATTACHABLE; 19 19 20 20 const VISIBILITY_DEFAULT = 'default'; 21 21 const VISIBILITY_VISIBLE = 'visible'; ··· 31 31 ->setVisibility(self::VISIBILITY_VISIBLE); 32 32 } 33 33 34 - public static function initializeNewPanelConfiguration( 34 + public static function initializeNewItem( 35 35 $profile_object, 36 - PhabricatorProfilePanel $panel) { 36 + PhabricatorProfileMenuItem $item) { 37 37 38 38 return self::initializeNewBuiltin() 39 39 ->setProfilePHID($profile_object->getPHID()) 40 - ->setMenuItemKey($panel->getPanelKey()) 41 - ->attachPanel($panel) 40 + ->setMenuItemKey($item->getMenuItemKey()) 41 + ->attachMenuItem($item) 42 42 ->attachProfileObject($profile_object); 43 43 } 44 44 ··· 67 67 PhabricatorProfileMenuItemPHIDType::TYPECONST); 68 68 } 69 69 70 - public function attachPanel(PhabricatorProfilePanel $panel) { 71 - $this->panel = $panel; 70 + public function attachMenuItem(PhabricatorProfileMenuItem $item) { 71 + $this->menuItem = $item; 72 72 return $this; 73 73 } 74 74 75 - public function getPanel() { 76 - return $this->assertAttached($this->panel); 75 + public function getMenuItem() { 76 + return $this->assertAttached($this->menuItem); 77 77 } 78 78 79 79 public function attachProfileObject($profile_object) { ··· 95 95 } 96 96 97 97 public function buildNavigationMenuItems() { 98 - return $this->getPanel()->buildNavigationMenuItems($this); 98 + return $this->getMenuItem()->buildNavigationMenuItems($this); 99 99 } 100 100 101 - public function getPanelTypeName() { 102 - return $this->getPanel()->getPanelTypeName(); 101 + public function getMenuItemTypeName() { 102 + return $this->getMenuItem()->getMenuItemTypeName(); 103 103 } 104 104 105 105 public function getDisplayName() { 106 - return $this->getPanel()->getDisplayName($this); 106 + return $this->getMenuItem()->getDisplayName($this); 107 107 } 108 108 109 109 public function canMakeDefault() { 110 - return $this->getPanel()->canMakeDefault($this); 110 + return $this->getMenuItem()->canMakeDefault($this); 111 111 } 112 112 113 113 public function canHideMenuItem() { 114 - return $this->getPanel()->canHidePanel($this); 114 + return $this->getMenuItem()->canHideMenuItem($this); 115 115 } 116 116 117 117 public function shouldEnableForObject($object) { 118 - return $this->getPanel()->shouldEnableForObject($object); 118 + return $this->getMenuItem()->shouldEnableForObject($object); 119 119 } 120 120 121 121 public function getSortKey() {
+1 -1
src/docs/user/userguide/profile_menu.diviner
··· 146 146 147 147 IMPORTANT: This feature is not stable, and the API is subject to change. 148 148 149 - To add new types of items, subclass @{class:PhabricatorProfilePanel}. 149 + To add new types of items, subclass @{class:PhabricatorProfileMenuItem}.