Differential D11088 Diff 26708 src/applications/config/controller/PhabricatorConfigHistoryController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/controller/PhabricatorConfigHistoryController.php
- This file was added.
| <?php | |||||
| final class PhabricatorConfigHistoryController | |||||
| extends PhabricatorConfigController { | |||||
| public function processRequest() { | |||||
| $request = $this->getRequest(); | |||||
| $user = $request->getUser(); | |||||
| $xactions = id(new PhabricatorConfigTransactionQuery()) | |||||
| ->setViewer($user) | |||||
| ->needComments(true) | |||||
| ->setReversePaging(false) | |||||
| ->execute(); | |||||
| $object = new PhabricatorConfigEntry(); | |||||
| $xaction = $object->getApplicationTransactionTemplate(); | |||||
| $view = $xaction->getApplicationTransactionViewObject(); | |||||
| $timeline = $view | |||||
| ->setUser($user) | |||||
| ->setTransactions($xactions) | |||||
| ->setRenderAsFeed(true) | |||||
| ->setObjectPHID(PhabricatorPHIDConstants::PHID_VOID); | |||||
| $timeline->setShouldTerminate(true); | |||||
| $object->willRenderTimeline($timeline, $this->getRequest()); | |||||
| $title = pht('Settings History'); | |||||
| $crumbs = $this->buildApplicationCrumbs(); | |||||
| $crumbs->addTextCrumb('Config', $this->getApplicationURI()); | |||||
| $crumbs->addTextCrumb($title, '/config/history/'); | |||||
| return $this->buildApplicationPage( | |||||
| array( | |||||
| $crumbs, | |||||
| $timeline, | |||||
| ), | |||||
| array( | |||||
| 'title' => $title, | |||||
| )); | |||||
| } | |||||
| } | |||||