1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-03 10:28:23 +01:00
phorge-phorge/src/applications/transactions/controller/PhabricatorApplicationTransactionDetailController.php

39 lines
979 B
PHP
Raw Normal View History

<?php
final class PhabricatorApplicationTransactionDetailController
extends PhabricatorApplicationTransactionController {
private $phid;
public function willProcessRequest(array $data) {
$this->phid = $data['phid'];
}
public function processRequest() {
$request = $this->getRequest();
$viewer = $request->getUser();
$xaction = id(new PhabricatorObjectQuery())
->withPHIDs(array($this->phid))
->setViewer($viewer)
->executeOne();
if (!$xaction) {
return new Aphront404Response();
}
$details = $xaction->renderChangeDetails($viewer);
$cancel_uri = $this->guessCancelURI($viewer, $xaction);
$dialog = id(new AphrontDialogView())
->setUser($viewer)
->setTitle(pht('Change Details'))
->setWidth(AphrontDialogView::WIDTH_FULL)
->setFlush(true)
->appendChild($details)
->addCancelButton($cancel_uri);
return id(new AphrontDialogResponse())->setDialog($dialog);
}
}