1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-03 20:22:46 +01:00
phorge-phorge/src/applications/project/engine/PhabricatorProjectProfilePanelEngine.php
epriestley 49a44a0b1f Make project menus unconditionally configurable
Summary: Fixes T10213. I think the "Edit" item was originally conditional (or maybe I just forgot to add that part), but that got dropped when we swapped how it worked. This is all stable now anyway and can be available without needing prototypes enabled.

Test Plan: Edited a project menu.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10213

Differential Revision: https://secure.phabricator.com/D15117
2016-01-26 08:26:33 -08:00

38 lines
1.1 KiB
PHP

<?php
final class PhabricatorProjectProfilePanelEngine
extends PhabricatorProfilePanelEngine {
protected function isPanelEngineConfigurable() {
return true;
}
protected function getPanelURI($path) {
$project = $this->getProfileObject();
$id = $project->getID();
return "/project/{$id}/panel/{$path}";
}
protected function getBuiltinProfilePanels($object) {
$panels = array();
$panels[] = $this->newPanel()
->setBuiltinKey(PhabricatorProject::PANEL_PROFILE)
->setPanelKey(PhabricatorProjectDetailsProfilePanel::PANELKEY);
$panels[] = $this->newPanel()
->setBuiltinKey(PhabricatorProject::PANEL_WORKBOARD)
->setPanelKey(PhabricatorProjectWorkboardProfilePanel::PANELKEY);
$panels[] = $this->newPanel()
->setBuiltinKey(PhabricatorProject::PANEL_MEMBERS)
->setPanelKey(PhabricatorProjectMembersProfilePanel::PANELKEY);
$panels[] = $this->newPanel()
->setBuiltinKey(PhabricatorProject::PANEL_MANAGE)
->setPanelKey(PhabricatorProjectManageProfilePanel::PANELKEY);
return $panels;
}
}