1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-10 14:51:06 +01:00
phorge-phorge/src/applications/project/controller/PhabricatorProjectViewController.php

37 lines
905 B
PHP
Raw Normal View History

<?php
final class PhabricatorProjectViewController
extends PhabricatorProjectController {
public function shouldAllowPublic() {
return true;
}
public function handleRequest(AphrontRequest $request) {
$request = $this->getRequest();
$viewer = $request->getViewer();
$response = $this->loadProject();
if ($response) {
return $response;
}
$project = $this->getProject();
$engine = $this->getProfilePanelEngine();
$default = $engine->getDefaultPanel();
switch ($default->getBuiltinKey()) {
case PhabricatorProject::PANEL_WORKBOARD:
$controller_object = new PhabricatorProjectBoardViewController();
break;
case PhabricatorProject::PANEL_PROFILE:
default:
$controller_object = new PhabricatorProjectProfileController();
break;
}
return $this->delegateToController($controller_object);
}
}