[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class HeraldRuleEditHistoryController extends HeraldController { 4 5 private $id; 6 7 public function willProcessRequest(array $data) { 8 $this->id = idx($data, 'id'); 9 } 10 11 public function processRequest() { 12 $request = $this->getRequest(); 13 14 $edit_query = new HeraldEditLogQuery(); 15 if ($this->id) { 16 $edit_query->withRuleIDs(array($this->id)); 17 } 18 19 $pager = new AphrontPagerView(); 20 $pager->setURI($request->getRequestURI(), 'offset'); 21 $pager->setOffset($request->getStr('offset')); 22 23 $edits = $edit_query->executeWithOffsetPager($pager); 24 25 $need_phids = mpull($edits, 'getEditorPHID'); 26 $handles = $this->loadViewerHandles($need_phids); 27 28 $list_view = id(new HeraldRuleEditHistoryView()) 29 ->setEdits($edits) 30 ->setHandles($handles) 31 ->setUser($this->getRequest()->getUser()); 32 33 $panel = new AphrontPanelView(); 34 $panel->setHeader(pht('Edit History')); 35 $panel->appendChild($list_view); 36 $panel->setNoBackground(); 37 38 $crumbs = $this 39 ->buildApplicationCrumbs($can_create = false) 40 ->addTextCrumb( 41 pht('Edit History'), 42 $this->getApplicationURI('herald/history')); 43 44 $nav = $this->buildSideNavView(); 45 $nav->selectFilter('history'); 46 $nav->appendChild($panel); 47 $nav->setCrumbs($crumbs); 48 49 return $this->buildApplicationPage( 50 $nav, 51 array( 52 'title' => pht('Rule Edit History'), 53 )); 54 } 55 56 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |