diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 97799da03e..07c043d5e5 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -3265,7 +3265,7 @@ phutil_register_library_map(array( 'PhabricatorPeopleProfileController' => 'applications/people/controller/PhabricatorPeopleProfileController.php', 'PhabricatorPeopleProfileEditController' => 'applications/people/controller/PhabricatorPeopleProfileEditController.php', 'PhabricatorPeopleProfileManageController' => 'applications/people/controller/PhabricatorPeopleProfileManageController.php', - 'PhabricatorPeopleProfilePanelEngine' => 'applications/people/engine/PhabricatorPeopleProfilePanelEngine.php', + 'PhabricatorPeopleProfileMenuEngine' => 'applications/people/engine/PhabricatorPeopleProfileMenuEngine.php', 'PhabricatorPeopleProfilePictureController' => 'applications/people/controller/PhabricatorPeopleProfilePictureController.php', 'PhabricatorPeopleProfileViewController' => 'applications/people/controller/PhabricatorPeopleProfileViewController.php', 'PhabricatorPeopleQuery' => 'applications/people/query/PhabricatorPeopleQuery.php', @@ -3364,6 +3364,7 @@ phutil_register_library_map(array( 'PhabricatorPolicyType' => 'applications/policy/constants/PhabricatorPolicyType.php', 'PhabricatorPonderApplication' => 'applications/ponder/application/PhabricatorPonderApplication.php', 'PhabricatorProfileMenuCollapsedSetting' => 'applications/settings/setting/PhabricatorProfileMenuCollapsedSetting.php', + 'PhabricatorProfileMenuEngine' => 'applications/search/engine/PhabricatorProfileMenuEngine.php', 'PhabricatorProfilePanel' => 'applications/search/profilepanel/PhabricatorProfilePanel.php', 'PhabricatorProfilePanelConfiguration' => 'applications/search/storage/PhabricatorProfilePanelConfiguration.php', 'PhabricatorProfilePanelConfigurationQuery' => 'applications/search/query/PhabricatorProfilePanelConfigurationQuery.php', @@ -3371,7 +3372,6 @@ phutil_register_library_map(array( 'PhabricatorProfilePanelConfigurationTransactionQuery' => 'applications/search/query/PhabricatorProfilePanelConfigurationTransactionQuery.php', 'PhabricatorProfilePanelEditEngine' => 'applications/search/editor/PhabricatorProfilePanelEditEngine.php', 'PhabricatorProfilePanelEditor' => 'applications/search/editor/PhabricatorProfilePanelEditor.php', - 'PhabricatorProfilePanelEngine' => 'applications/search/engine/PhabricatorProfilePanelEngine.php', 'PhabricatorProfilePanelIconSet' => 'applications/search/profilepanel/PhabricatorProfilePanelIconSet.php', 'PhabricatorProfilePanelPHIDType' => 'applications/search/phidtype/PhabricatorProfilePanelPHIDType.php', 'PhabricatorProject' => 'applications/project/storage/PhabricatorProject.php', @@ -3452,7 +3452,7 @@ phutil_register_library_map(array( 'PhabricatorProjectPanelController' => 'applications/project/controller/PhabricatorProjectPanelController.php', 'PhabricatorProjectPointsProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectPointsProfilePanel.php', 'PhabricatorProjectProfileController' => 'applications/project/controller/PhabricatorProjectProfileController.php', - 'PhabricatorProjectProfilePanelEngine' => 'applications/project/engine/PhabricatorProjectProfilePanelEngine.php', + 'PhabricatorProjectProfileMenuEngine' => 'applications/project/engine/PhabricatorProjectProfileMenuEngine.php', 'PhabricatorProjectProjectHasMemberEdgeType' => 'applications/project/edge/PhabricatorProjectProjectHasMemberEdgeType.php', 'PhabricatorProjectProjectHasObjectEdgeType' => 'applications/project/edge/PhabricatorProjectProjectHasObjectEdgeType.php', 'PhabricatorProjectProjectPHIDType' => 'applications/project/phid/PhabricatorProjectProjectPHIDType.php', @@ -8331,7 +8331,7 @@ phutil_register_library_map(array( 'PhabricatorPeopleProfileController' => 'PhabricatorPeopleController', 'PhabricatorPeopleProfileEditController' => 'PhabricatorPeopleProfileController', 'PhabricatorPeopleProfileManageController' => 'PhabricatorPeopleProfileController', - 'PhabricatorPeopleProfilePanelEngine' => 'PhabricatorProfilePanelEngine', + 'PhabricatorPeopleProfileMenuEngine' => 'PhabricatorProfileMenuEngine', 'PhabricatorPeopleProfilePictureController' => 'PhabricatorPeopleProfileController', 'PhabricatorPeopleProfileViewController' => 'PhabricatorPeopleProfileController', 'PhabricatorPeopleQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', @@ -8450,6 +8450,7 @@ phutil_register_library_map(array( 'PhabricatorPolicyType' => 'PhabricatorPolicyConstants', 'PhabricatorPonderApplication' => 'PhabricatorApplication', 'PhabricatorProfileMenuCollapsedSetting' => 'PhabricatorInternalSetting', + 'PhabricatorProfileMenuEngine' => 'Phobject', 'PhabricatorProfilePanel' => 'Phobject', 'PhabricatorProfilePanelConfiguration' => array( 'PhabricatorSearchDAO', @@ -8462,7 +8463,6 @@ phutil_register_library_map(array( 'PhabricatorProfilePanelConfigurationTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 'PhabricatorProfilePanelEditEngine' => 'PhabricatorEditEngine', 'PhabricatorProfilePanelEditor' => 'PhabricatorApplicationTransactionEditor', - 'PhabricatorProfilePanelEngine' => 'Phobject', 'PhabricatorProfilePanelIconSet' => 'PhabricatorIconSet', 'PhabricatorProfilePanelPHIDType' => 'PhabricatorPHIDType', 'PhabricatorProject' => array( @@ -8565,7 +8565,7 @@ phutil_register_library_map(array( 'PhabricatorProjectPanelController' => 'PhabricatorProjectController', 'PhabricatorProjectPointsProfilePanel' => 'PhabricatorProfilePanel', 'PhabricatorProjectProfileController' => 'PhabricatorProjectController', - 'PhabricatorProjectProfilePanelEngine' => 'PhabricatorProfilePanelEngine', + 'PhabricatorProjectProfileMenuEngine' => 'PhabricatorProfileMenuEngine', 'PhabricatorProjectProjectHasMemberEdgeType' => 'PhabricatorEdgeType', 'PhabricatorProjectProjectHasObjectEdgeType' => 'PhabricatorEdgeType', 'PhabricatorProjectProjectPHIDType' => 'PhabricatorPHIDType', diff --git a/src/applications/people/controller/PhabricatorPeopleProfileController.php b/src/applications/people/controller/PhabricatorPeopleProfileController.php index 74705f9809..1e0a9cbe18 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfileController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileController.php @@ -36,7 +36,7 @@ abstract class PhabricatorPeopleProfileController if ($user) { $viewer = $this->getViewer(); - $engine = id(new PhabricatorPeopleProfilePanelEngine()) + $engine = id(new PhabricatorPeopleProfileMenuEngine()) ->setViewer($viewer) ->setProfileObject($user); diff --git a/src/applications/people/controller/PhabricatorPeopleProfileEditController.php b/src/applications/people/controller/PhabricatorPeopleProfileEditController.php index 9f132a18d8..50fb0c29b5 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfileEditController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileEditController.php @@ -85,7 +85,7 @@ final class PhabricatorPeopleProfileEditController $crumbs->setBorder(true); $nav = $this->getProfileMenu(); - $nav->selectFilter(PhabricatorPeopleProfilePanelEngine::PANEL_MANAGE); + $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::PANEL_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 index d298660bd3..6b087891be 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfileManageController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileManageController.php @@ -43,7 +43,7 @@ final class PhabricatorPeopleProfileManageController $name = $user->getUsername(); $nav = $this->getProfileMenu(); - $nav->selectFilter(PhabricatorPeopleProfilePanelEngine::PANEL_MANAGE); + $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::PANEL_MANAGE); $timeline = $this->buildTransactionTimeline( $user, diff --git a/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php b/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php index 29b2290153..8a65a9b179 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php @@ -256,7 +256,7 @@ final class PhabricatorPeopleProfilePictureController $crumbs->setBorder(true); $nav = $this->getProfileMenu(); - $nav->selectFilter(PhabricatorPeopleProfilePanelEngine::PANEL_MANAGE); + $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::PANEL_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 index 79134de017..a83a1f93ef 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php @@ -78,7 +78,7 @@ final class PhabricatorPeopleProfileViewController )); $nav = $this->getProfileMenu(); - $nav->selectFilter(PhabricatorPeopleProfilePanelEngine::PANEL_PROFILE); + $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::PANEL_PROFILE); $crumbs = $this->buildApplicationCrumbs(); $crumbs->setBorder(true); diff --git a/src/applications/people/engine/PhabricatorPeopleProfilePanelEngine.php b/src/applications/people/engine/PhabricatorPeopleProfileMenuEngine.php similarity index 94% rename from src/applications/people/engine/PhabricatorPeopleProfilePanelEngine.php rename to src/applications/people/engine/PhabricatorPeopleProfileMenuEngine.php index db362d2049..847c20389c 100644 --- a/src/applications/people/engine/PhabricatorPeopleProfilePanelEngine.php +++ b/src/applications/people/engine/PhabricatorPeopleProfileMenuEngine.php @@ -1,12 +1,12 @@ getBool('default'); if ($set_default) { $this - ->getProfilePanelEngine() + ->getProfileMenuEngine() ->adjustDefault(PhabricatorProject::PANEL_WORKBOARD); } diff --git a/src/applications/project/controller/PhabricatorProjectController.php b/src/applications/project/controller/PhabricatorProjectController.php index 8da16f923b..45e2f193af 100644 --- a/src/applications/project/controller/PhabricatorProjectController.php +++ b/src/applications/project/controller/PhabricatorProjectController.php @@ -4,7 +4,7 @@ abstract class PhabricatorProjectController extends PhabricatorController { private $project; private $profileMenu; - private $profilePanelEngine; + private $profileMenuEngine; protected function setProject(PhabricatorProject $project) { $this->project = $project; @@ -99,7 +99,7 @@ abstract class PhabricatorProjectController extends PhabricatorController { protected function getProfileMenu() { if (!$this->profileMenu) { - $engine = $this->getProfilePanelEngine(); + $engine = $this->getProfileMenuEngine(); if ($engine) { $this->profileMenu = $engine->buildNavigation(); } @@ -127,24 +127,25 @@ abstract class PhabricatorProjectController extends PhabricatorController { return $crumbs; } - protected function getProfilePanelEngine() { - if (!$this->profilePanelEngine) { + protected function getProfileMenuEngine() { + if (!$this->profileMenuEngine) { $viewer = $this->getViewer(); $project = $this->getProject(); if ($project) { - $engine = id(new PhabricatorProjectProfilePanelEngine()) + $engine = id(new PhabricatorProjectProfileMenuEngine()) ->setViewer($viewer) ->setController($this) ->setProfileObject($project); - $this->profilePanelEngine = $engine; + $this->profileMenuEngine = $engine; } } - return $this->profilePanelEngine; + + return $this->profileMenuEngine; } - protected function setProfilePanelEngine( - PhabricatorProjectProfilePanelEngine $engine) { - $this->profilePanelEngine = $engine; + protected function setProfileMenuEngine( + PhabricatorProjectProfileMenuEngine $engine) { + $this->profileMenuEngine = $engine; return $this; } diff --git a/src/applications/project/controller/PhabricatorProjectPanelController.php b/src/applications/project/controller/PhabricatorProjectPanelController.php index d20b5b9828..940553368c 100644 --- a/src/applications/project/controller/PhabricatorProjectPanelController.php +++ b/src/applications/project/controller/PhabricatorProjectPanelController.php @@ -12,11 +12,11 @@ final class PhabricatorProjectPanelController $viewer = $this->getViewer(); $project = $this->getProject(); - $engine = id(new PhabricatorProjectProfilePanelEngine()) + $engine = id(new PhabricatorProjectProfileMenuEngine()) ->setProfileObject($project) ->setController($this); - $this->setProfilePanelEngine($engine); + $this->setProfileMenuEngine($engine); return $engine->buildResponse(); } diff --git a/src/applications/project/controller/PhabricatorProjectViewController.php b/src/applications/project/controller/PhabricatorProjectViewController.php index 412565c056..7a12d2c89c 100644 --- a/src/applications/project/controller/PhabricatorProjectViewController.php +++ b/src/applications/project/controller/PhabricatorProjectViewController.php @@ -17,7 +17,7 @@ final class PhabricatorProjectViewController } $project = $this->getProject(); - $engine = $this->getProfilePanelEngine(); + $engine = $this->getProfileMenuEngine(); $default = $engine->getDefaultPanel(); switch ($default->getBuiltinKey()) { diff --git a/src/applications/project/engine/PhabricatorProjectProfilePanelEngine.php b/src/applications/project/engine/PhabricatorProjectProfileMenuEngine.php similarity index 90% rename from src/applications/project/engine/PhabricatorProjectProfilePanelEngine.php rename to src/applications/project/engine/PhabricatorProjectProfileMenuEngine.php index 3a34b6c80c..0c43a22a54 100644 --- a/src/applications/project/engine/PhabricatorProjectProfilePanelEngine.php +++ b/src/applications/project/engine/PhabricatorProjectProfileMenuEngine.php @@ -1,9 +1,9 @@ panelEngine = $engine; + public function setMenuEngine(PhabricatorProfileMenuEngine $engine) { + $this->menuEngine = $engine; return $this; } - public function getPanelEngine() { - return $this->panelEngine; + public function getMenuEngine() { + return $this->menuEngine; } public function setProfileObject($profile_object) { @@ -113,11 +113,11 @@ final class PhabricatorProfilePanelEditEngine } protected function getObjectCreateCancelURI($object) { - return $this->getPanelEngine()->getConfigureURI(); + return $this->getMenuEngine()->getConfigureURI(); } protected function getObjectViewURI($object) { - return $this->getPanelEngine()->getConfigureURI(); + return $this->getMenuEngine()->getConfigureURI(); } protected function buildCustomEditFields($object) { diff --git a/src/applications/search/engine/PhabricatorProfilePanelEngine.php b/src/applications/search/engine/PhabricatorProfileMenuEngine.php similarity index 99% rename from src/applications/search/engine/PhabricatorProfilePanelEngine.php rename to src/applications/search/engine/PhabricatorProfileMenuEngine.php index d3c209ba68..4ed56557f9 100644 --- a/src/applications/search/engine/PhabricatorProfilePanelEngine.php +++ b/src/applications/search/engine/PhabricatorProfileMenuEngine.php @@ -1,6 +1,6 @@ getController(); @@ -63,7 +63,7 @@ abstract class PhabricatorProfilePanelEngine extends Phobject { // If the engine is not configurable, don't respond to any of the editing // or configuration routes. - if (!$this->isPanelEngineConfigurable()) { + if (!$this->isMenuEngineConfigurable()) { switch ($panel_action) { case 'view': break; @@ -709,7 +709,7 @@ abstract class PhabricatorProfilePanelEngine extends Phobject { $controller = $this->getController(); return id(new PhabricatorProfilePanelEditEngine()) - ->setPanelEngine($this) + ->setMenuEngine($this) ->setProfileObject($object) ->setNewPanelConfiguration($configuration) ->setController($controller) @@ -722,7 +722,7 @@ abstract class PhabricatorProfilePanelEngine extends Phobject { $controller = $this->getController(); return id(new PhabricatorProfilePanelEditEngine()) - ->setPanelEngine($this) + ->setMenuEngine($this) ->setProfileObject($object) ->setController($controller) ->buildResponse(); @@ -753,7 +753,7 @@ abstract class PhabricatorProfilePanelEngine extends Phobject { return id(new PhabricatorProfilePanelEditEngine()) ->setIsBuiltin(true) - ->setPanelEngine($this) + ->setMenuEngine($this) ->setProfileObject($object) ->setNewPanelConfiguration($configuration) ->setController($controller)