1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 12:30:56 +01:00

Rename "PanelEngine" to "MenuEngine"

Summary: Ref T11957.

Test Plan:
Grepped for "PanelEngine", renamed everything except "PanelEditEngine".

Grepped for these changed symbols:

```
ispanelengineconfigurable
getprofilepanelengine
setprofilepanelengine
setpanelengine
getpanelengine
PhabricatorProfilePanelEditEngine
```

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11957

Differential Revision: https://secure.phabricator.com/D17025
This commit is contained in:
epriestley 2016-12-11 09:00:44 -08:00
parent fddd467400
commit 923d3d3060
14 changed files with 45 additions and 44 deletions

View file

@ -3265,7 +3265,7 @@ phutil_register_library_map(array(
'PhabricatorPeopleProfileController' => 'applications/people/controller/PhabricatorPeopleProfileController.php', 'PhabricatorPeopleProfileController' => 'applications/people/controller/PhabricatorPeopleProfileController.php',
'PhabricatorPeopleProfileEditController' => 'applications/people/controller/PhabricatorPeopleProfileEditController.php', 'PhabricatorPeopleProfileEditController' => 'applications/people/controller/PhabricatorPeopleProfileEditController.php',
'PhabricatorPeopleProfileManageController' => 'applications/people/controller/PhabricatorPeopleProfileManageController.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', 'PhabricatorPeopleProfilePictureController' => 'applications/people/controller/PhabricatorPeopleProfilePictureController.php',
'PhabricatorPeopleProfileViewController' => 'applications/people/controller/PhabricatorPeopleProfileViewController.php', 'PhabricatorPeopleProfileViewController' => 'applications/people/controller/PhabricatorPeopleProfileViewController.php',
'PhabricatorPeopleQuery' => 'applications/people/query/PhabricatorPeopleQuery.php', 'PhabricatorPeopleQuery' => 'applications/people/query/PhabricatorPeopleQuery.php',
@ -3364,6 +3364,7 @@ phutil_register_library_map(array(
'PhabricatorPolicyType' => 'applications/policy/constants/PhabricatorPolicyType.php', 'PhabricatorPolicyType' => 'applications/policy/constants/PhabricatorPolicyType.php',
'PhabricatorPonderApplication' => 'applications/ponder/application/PhabricatorPonderApplication.php', 'PhabricatorPonderApplication' => 'applications/ponder/application/PhabricatorPonderApplication.php',
'PhabricatorProfileMenuCollapsedSetting' => 'applications/settings/setting/PhabricatorProfileMenuCollapsedSetting.php', 'PhabricatorProfileMenuCollapsedSetting' => 'applications/settings/setting/PhabricatorProfileMenuCollapsedSetting.php',
'PhabricatorProfileMenuEngine' => 'applications/search/engine/PhabricatorProfileMenuEngine.php',
'PhabricatorProfilePanel' => 'applications/search/profilepanel/PhabricatorProfilePanel.php', 'PhabricatorProfilePanel' => 'applications/search/profilepanel/PhabricatorProfilePanel.php',
'PhabricatorProfilePanelConfiguration' => 'applications/search/storage/PhabricatorProfilePanelConfiguration.php', 'PhabricatorProfilePanelConfiguration' => 'applications/search/storage/PhabricatorProfilePanelConfiguration.php',
'PhabricatorProfilePanelConfigurationQuery' => 'applications/search/query/PhabricatorProfilePanelConfigurationQuery.php', 'PhabricatorProfilePanelConfigurationQuery' => 'applications/search/query/PhabricatorProfilePanelConfigurationQuery.php',
@ -3371,7 +3372,6 @@ phutil_register_library_map(array(
'PhabricatorProfilePanelConfigurationTransactionQuery' => 'applications/search/query/PhabricatorProfilePanelConfigurationTransactionQuery.php', 'PhabricatorProfilePanelConfigurationTransactionQuery' => 'applications/search/query/PhabricatorProfilePanelConfigurationTransactionQuery.php',
'PhabricatorProfilePanelEditEngine' => 'applications/search/editor/PhabricatorProfilePanelEditEngine.php', 'PhabricatorProfilePanelEditEngine' => 'applications/search/editor/PhabricatorProfilePanelEditEngine.php',
'PhabricatorProfilePanelEditor' => 'applications/search/editor/PhabricatorProfilePanelEditor.php', 'PhabricatorProfilePanelEditor' => 'applications/search/editor/PhabricatorProfilePanelEditor.php',
'PhabricatorProfilePanelEngine' => 'applications/search/engine/PhabricatorProfilePanelEngine.php',
'PhabricatorProfilePanelIconSet' => 'applications/search/profilepanel/PhabricatorProfilePanelIconSet.php', 'PhabricatorProfilePanelIconSet' => 'applications/search/profilepanel/PhabricatorProfilePanelIconSet.php',
'PhabricatorProfilePanelPHIDType' => 'applications/search/phidtype/PhabricatorProfilePanelPHIDType.php', 'PhabricatorProfilePanelPHIDType' => 'applications/search/phidtype/PhabricatorProfilePanelPHIDType.php',
'PhabricatorProject' => 'applications/project/storage/PhabricatorProject.php', 'PhabricatorProject' => 'applications/project/storage/PhabricatorProject.php',
@ -3452,7 +3452,7 @@ phutil_register_library_map(array(
'PhabricatorProjectPanelController' => 'applications/project/controller/PhabricatorProjectPanelController.php', 'PhabricatorProjectPanelController' => 'applications/project/controller/PhabricatorProjectPanelController.php',
'PhabricatorProjectPointsProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectPointsProfilePanel.php', 'PhabricatorProjectPointsProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectPointsProfilePanel.php',
'PhabricatorProjectProfileController' => 'applications/project/controller/PhabricatorProjectProfileController.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', 'PhabricatorProjectProjectHasMemberEdgeType' => 'applications/project/edge/PhabricatorProjectProjectHasMemberEdgeType.php',
'PhabricatorProjectProjectHasObjectEdgeType' => 'applications/project/edge/PhabricatorProjectProjectHasObjectEdgeType.php', 'PhabricatorProjectProjectHasObjectEdgeType' => 'applications/project/edge/PhabricatorProjectProjectHasObjectEdgeType.php',
'PhabricatorProjectProjectPHIDType' => 'applications/project/phid/PhabricatorProjectProjectPHIDType.php', 'PhabricatorProjectProjectPHIDType' => 'applications/project/phid/PhabricatorProjectProjectPHIDType.php',
@ -8331,7 +8331,7 @@ phutil_register_library_map(array(
'PhabricatorPeopleProfileController' => 'PhabricatorPeopleController', 'PhabricatorPeopleProfileController' => 'PhabricatorPeopleController',
'PhabricatorPeopleProfileEditController' => 'PhabricatorPeopleProfileController', 'PhabricatorPeopleProfileEditController' => 'PhabricatorPeopleProfileController',
'PhabricatorPeopleProfileManageController' => 'PhabricatorPeopleProfileController', 'PhabricatorPeopleProfileManageController' => 'PhabricatorPeopleProfileController',
'PhabricatorPeopleProfilePanelEngine' => 'PhabricatorProfilePanelEngine', 'PhabricatorPeopleProfileMenuEngine' => 'PhabricatorProfileMenuEngine',
'PhabricatorPeopleProfilePictureController' => 'PhabricatorPeopleProfileController', 'PhabricatorPeopleProfilePictureController' => 'PhabricatorPeopleProfileController',
'PhabricatorPeopleProfileViewController' => 'PhabricatorPeopleProfileController', 'PhabricatorPeopleProfileViewController' => 'PhabricatorPeopleProfileController',
'PhabricatorPeopleQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 'PhabricatorPeopleQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
@ -8450,6 +8450,7 @@ phutil_register_library_map(array(
'PhabricatorPolicyType' => 'PhabricatorPolicyConstants', 'PhabricatorPolicyType' => 'PhabricatorPolicyConstants',
'PhabricatorPonderApplication' => 'PhabricatorApplication', 'PhabricatorPonderApplication' => 'PhabricatorApplication',
'PhabricatorProfileMenuCollapsedSetting' => 'PhabricatorInternalSetting', 'PhabricatorProfileMenuCollapsedSetting' => 'PhabricatorInternalSetting',
'PhabricatorProfileMenuEngine' => 'Phobject',
'PhabricatorProfilePanel' => 'Phobject', 'PhabricatorProfilePanel' => 'Phobject',
'PhabricatorProfilePanelConfiguration' => array( 'PhabricatorProfilePanelConfiguration' => array(
'PhabricatorSearchDAO', 'PhabricatorSearchDAO',
@ -8462,7 +8463,6 @@ phutil_register_library_map(array(
'PhabricatorProfilePanelConfigurationTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 'PhabricatorProfilePanelConfigurationTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
'PhabricatorProfilePanelEditEngine' => 'PhabricatorEditEngine', 'PhabricatorProfilePanelEditEngine' => 'PhabricatorEditEngine',
'PhabricatorProfilePanelEditor' => 'PhabricatorApplicationTransactionEditor', 'PhabricatorProfilePanelEditor' => 'PhabricatorApplicationTransactionEditor',
'PhabricatorProfilePanelEngine' => 'Phobject',
'PhabricatorProfilePanelIconSet' => 'PhabricatorIconSet', 'PhabricatorProfilePanelIconSet' => 'PhabricatorIconSet',
'PhabricatorProfilePanelPHIDType' => 'PhabricatorPHIDType', 'PhabricatorProfilePanelPHIDType' => 'PhabricatorPHIDType',
'PhabricatorProject' => array( 'PhabricatorProject' => array(
@ -8565,7 +8565,7 @@ phutil_register_library_map(array(
'PhabricatorProjectPanelController' => 'PhabricatorProjectController', 'PhabricatorProjectPanelController' => 'PhabricatorProjectController',
'PhabricatorProjectPointsProfilePanel' => 'PhabricatorProfilePanel', 'PhabricatorProjectPointsProfilePanel' => 'PhabricatorProfilePanel',
'PhabricatorProjectProfileController' => 'PhabricatorProjectController', 'PhabricatorProjectProfileController' => 'PhabricatorProjectController',
'PhabricatorProjectProfilePanelEngine' => 'PhabricatorProfilePanelEngine', 'PhabricatorProjectProfileMenuEngine' => 'PhabricatorProfileMenuEngine',
'PhabricatorProjectProjectHasMemberEdgeType' => 'PhabricatorEdgeType', 'PhabricatorProjectProjectHasMemberEdgeType' => 'PhabricatorEdgeType',
'PhabricatorProjectProjectHasObjectEdgeType' => 'PhabricatorEdgeType', 'PhabricatorProjectProjectHasObjectEdgeType' => 'PhabricatorEdgeType',
'PhabricatorProjectProjectPHIDType' => 'PhabricatorPHIDType', 'PhabricatorProjectProjectPHIDType' => 'PhabricatorPHIDType',

View file

@ -36,7 +36,7 @@ abstract class PhabricatorPeopleProfileController
if ($user) { if ($user) {
$viewer = $this->getViewer(); $viewer = $this->getViewer();
$engine = id(new PhabricatorPeopleProfilePanelEngine()) $engine = id(new PhabricatorPeopleProfileMenuEngine())
->setViewer($viewer) ->setViewer($viewer)
->setProfileObject($user); ->setProfileObject($user);

View file

@ -85,7 +85,7 @@ final class PhabricatorPeopleProfileEditController
$crumbs->setBorder(true); $crumbs->setBorder(true);
$nav = $this->getProfileMenu(); $nav = $this->getProfileMenu();
$nav->selectFilter(PhabricatorPeopleProfilePanelEngine::PANEL_MANAGE); $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::PANEL_MANAGE);
$header = id(new PHUIHeaderView()) $header = id(new PHUIHeaderView())
->setHeader(pht('Edit Profile: %s', $user->getFullName())) ->setHeader(pht('Edit Profile: %s', $user->getFullName()))

View file

@ -43,7 +43,7 @@ final class PhabricatorPeopleProfileManageController
$name = $user->getUsername(); $name = $user->getUsername();
$nav = $this->getProfileMenu(); $nav = $this->getProfileMenu();
$nav->selectFilter(PhabricatorPeopleProfilePanelEngine::PANEL_MANAGE); $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::PANEL_MANAGE);
$timeline = $this->buildTransactionTimeline( $timeline = $this->buildTransactionTimeline(
$user, $user,

View file

@ -256,7 +256,7 @@ final class PhabricatorPeopleProfilePictureController
$crumbs->setBorder(true); $crumbs->setBorder(true);
$nav = $this->getProfileMenu(); $nav = $this->getProfileMenu();
$nav->selectFilter(PhabricatorPeopleProfilePanelEngine::PANEL_MANAGE); $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::PANEL_MANAGE);
$header = id(new PHUIHeaderView()) $header = id(new PHUIHeaderView())
->setHeader(pht('Edit Profile Picture')) ->setHeader(pht('Edit Profile Picture'))

View file

@ -78,7 +78,7 @@ final class PhabricatorPeopleProfileViewController
)); ));
$nav = $this->getProfileMenu(); $nav = $this->getProfileMenu();
$nav->selectFilter(PhabricatorPeopleProfilePanelEngine::PANEL_PROFILE); $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::PANEL_PROFILE);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->setBorder(true); $crumbs->setBorder(true);

View file

@ -1,12 +1,12 @@
<?php <?php
final class PhabricatorPeopleProfilePanelEngine final class PhabricatorPeopleProfileMenuEngine
extends PhabricatorProfilePanelEngine { extends PhabricatorProfileMenuEngine {
const PANEL_PROFILE = 'people.profile'; const PANEL_PROFILE = 'people.profile';
const PANEL_MANAGE = 'people.manage'; const PANEL_MANAGE = 'people.manage';
protected function isPanelEngineConfigurable() { protected function isMenuEngineConfigurable() {
return false; return false;
} }

View file

@ -935,7 +935,7 @@ final class PhabricatorProjectBoardViewController
$set_default = $request->getBool('default'); $set_default = $request->getBool('default');
if ($set_default) { if ($set_default) {
$this $this
->getProfilePanelEngine() ->getProfileMenuEngine()
->adjustDefault(PhabricatorProject::PANEL_WORKBOARD); ->adjustDefault(PhabricatorProject::PANEL_WORKBOARD);
} }

View file

@ -4,7 +4,7 @@ abstract class PhabricatorProjectController extends PhabricatorController {
private $project; private $project;
private $profileMenu; private $profileMenu;
private $profilePanelEngine; private $profileMenuEngine;
protected function setProject(PhabricatorProject $project) { protected function setProject(PhabricatorProject $project) {
$this->project = $project; $this->project = $project;
@ -99,7 +99,7 @@ abstract class PhabricatorProjectController extends PhabricatorController {
protected function getProfileMenu() { protected function getProfileMenu() {
if (!$this->profileMenu) { if (!$this->profileMenu) {
$engine = $this->getProfilePanelEngine(); $engine = $this->getProfileMenuEngine();
if ($engine) { if ($engine) {
$this->profileMenu = $engine->buildNavigation(); $this->profileMenu = $engine->buildNavigation();
} }
@ -127,24 +127,25 @@ abstract class PhabricatorProjectController extends PhabricatorController {
return $crumbs; return $crumbs;
} }
protected function getProfilePanelEngine() { protected function getProfileMenuEngine() {
if (!$this->profilePanelEngine) { if (!$this->profileMenuEngine) {
$viewer = $this->getViewer(); $viewer = $this->getViewer();
$project = $this->getProject(); $project = $this->getProject();
if ($project) { if ($project) {
$engine = id(new PhabricatorProjectProfilePanelEngine()) $engine = id(new PhabricatorProjectProfileMenuEngine())
->setViewer($viewer) ->setViewer($viewer)
->setController($this) ->setController($this)
->setProfileObject($project); ->setProfileObject($project);
$this->profilePanelEngine = $engine; $this->profileMenuEngine = $engine;
} }
} }
return $this->profilePanelEngine;
}
protected function setProfilePanelEngine( return $this->profileMenuEngine;
PhabricatorProjectProfilePanelEngine $engine) { }
$this->profilePanelEngine = $engine;
protected function setProfileMenuEngine(
PhabricatorProjectProfileMenuEngine $engine) {
$this->profileMenuEngine = $engine;
return $this; return $this;
} }

View file

@ -12,11 +12,11 @@ final class PhabricatorProjectPanelController
$viewer = $this->getViewer(); $viewer = $this->getViewer();
$project = $this->getProject(); $project = $this->getProject();
$engine = id(new PhabricatorProjectProfilePanelEngine()) $engine = id(new PhabricatorProjectProfileMenuEngine())
->setProfileObject($project) ->setProfileObject($project)
->setController($this); ->setController($this);
$this->setProfilePanelEngine($engine); $this->setProfileMenuEngine($engine);
return $engine->buildResponse(); return $engine->buildResponse();
} }

View file

@ -17,7 +17,7 @@ final class PhabricatorProjectViewController
} }
$project = $this->getProject(); $project = $this->getProject();
$engine = $this->getProfilePanelEngine(); $engine = $this->getProfileMenuEngine();
$default = $engine->getDefaultPanel(); $default = $engine->getDefaultPanel();
switch ($default->getBuiltinKey()) { switch ($default->getBuiltinKey()) {

View file

@ -1,9 +1,9 @@
<?php <?php
final class PhabricatorProjectProfilePanelEngine final class PhabricatorProjectProfileMenuEngine
extends PhabricatorProfilePanelEngine { extends PhabricatorProfileMenuEngine {
protected function isPanelEngineConfigurable() { protected function isMenuEngineConfigurable() {
return true; return true;
} }

View file

@ -5,7 +5,7 @@ final class PhabricatorProfilePanelEditEngine
const ENGINECONST = 'search.profilepanel'; const ENGINECONST = 'search.profilepanel';
private $panelEngine; private $menuEngine;
private $profileObject; private $profileObject;
private $newPanelConfiguration; private $newPanelConfiguration;
private $isBuiltin; private $isBuiltin;
@ -14,13 +14,13 @@ final class PhabricatorProfilePanelEditEngine
return false; return false;
} }
public function setPanelEngine(PhabricatorProfilePanelEngine $engine) { public function setMenuEngine(PhabricatorProfileMenuEngine $engine) {
$this->panelEngine = $engine; $this->menuEngine = $engine;
return $this; return $this;
} }
public function getPanelEngine() { public function getMenuEngine() {
return $this->panelEngine; return $this->menuEngine;
} }
public function setProfileObject($profile_object) { public function setProfileObject($profile_object) {
@ -113,11 +113,11 @@ final class PhabricatorProfilePanelEditEngine
} }
protected function getObjectCreateCancelURI($object) { protected function getObjectCreateCancelURI($object) {
return $this->getPanelEngine()->getConfigureURI(); return $this->getMenuEngine()->getConfigureURI();
} }
protected function getObjectViewURI($object) { protected function getObjectViewURI($object) {
return $this->getPanelEngine()->getConfigureURI(); return $this->getMenuEngine()->getConfigureURI();
} }
protected function buildCustomEditFields($object) { protected function buildCustomEditFields($object) {

View file

@ -1,6 +1,6 @@
<?php <?php
abstract class PhabricatorProfilePanelEngine extends Phobject { abstract class PhabricatorProfileMenuEngine extends Phobject {
private $viewer; private $viewer;
private $profileObject; private $profileObject;
@ -49,7 +49,7 @@ abstract class PhabricatorProfilePanelEngine extends Phobject {
abstract protected function getPanelURI($path); abstract protected function getPanelURI($path);
abstract protected function isPanelEngineConfigurable(); abstract protected function isMenuEngineConfigurable();
public function buildResponse() { public function buildResponse() {
$controller = $this->getController(); $controller = $this->getController();
@ -63,7 +63,7 @@ abstract class PhabricatorProfilePanelEngine extends Phobject {
// If the engine is not configurable, don't respond to any of the editing // If the engine is not configurable, don't respond to any of the editing
// or configuration routes. // or configuration routes.
if (!$this->isPanelEngineConfigurable()) { if (!$this->isMenuEngineConfigurable()) {
switch ($panel_action) { switch ($panel_action) {
case 'view': case 'view':
break; break;
@ -709,7 +709,7 @@ abstract class PhabricatorProfilePanelEngine extends Phobject {
$controller = $this->getController(); $controller = $this->getController();
return id(new PhabricatorProfilePanelEditEngine()) return id(new PhabricatorProfilePanelEditEngine())
->setPanelEngine($this) ->setMenuEngine($this)
->setProfileObject($object) ->setProfileObject($object)
->setNewPanelConfiguration($configuration) ->setNewPanelConfiguration($configuration)
->setController($controller) ->setController($controller)
@ -722,7 +722,7 @@ abstract class PhabricatorProfilePanelEngine extends Phobject {
$controller = $this->getController(); $controller = $this->getController();
return id(new PhabricatorProfilePanelEditEngine()) return id(new PhabricatorProfilePanelEditEngine())
->setPanelEngine($this) ->setMenuEngine($this)
->setProfileObject($object) ->setProfileObject($object)
->setController($controller) ->setController($controller)
->buildResponse(); ->buildResponse();
@ -753,7 +753,7 @@ abstract class PhabricatorProfilePanelEngine extends Phobject {
return id(new PhabricatorProfilePanelEditEngine()) return id(new PhabricatorProfilePanelEditEngine())
->setIsBuiltin(true) ->setIsBuiltin(true)
->setPanelEngine($this) ->setMenuEngine($this)
->setProfileObject($object) ->setProfileObject($object)
->setNewPanelConfiguration($configuration) ->setNewPanelConfiguration($configuration)
->setController($controller) ->setController($controller)