1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 04:20:55 +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',
'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',

View file

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

View file

@ -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()))

View file

@ -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,

View file

@ -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'))

View file

@ -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);

View file

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

View file

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

View file

@ -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;
}
protected function setProfilePanelEngine(
PhabricatorProjectProfilePanelEngine $engine) {
$this->profilePanelEngine = $engine;
return $this->profileMenuEngine;
}
protected function setProfileMenuEngine(
PhabricatorProjectProfileMenuEngine $engine) {
$this->profileMenuEngine = $engine;
return $this;
}

View file

@ -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();
}

View file

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

View file

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

View file

@ -5,7 +5,7 @@ final class PhabricatorProfilePanelEditEngine
const ENGINECONST = 'search.profilepanel';
private $panelEngine;
private $menuEngine;
private $profileObject;
private $newPanelConfiguration;
private $isBuiltin;
@ -14,13 +14,13 @@ final class PhabricatorProfilePanelEditEngine
return false;
}
public function setPanelEngine(PhabricatorProfilePanelEngine $engine) {
$this->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) {

View file

@ -1,6 +1,6 @@
<?php
abstract class PhabricatorProfilePanelEngine extends Phobject {
abstract class PhabricatorProfileMenuEngine extends Phobject {
private $viewer;
private $profileObject;
@ -49,7 +49,7 @@ abstract class PhabricatorProfilePanelEngine extends Phobject {
abstract protected function getPanelURI($path);
abstract protected function isPanelEngineConfigurable();
abstract protected function isMenuEngineConfigurable();
public function buildResponse() {
$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
// 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)