[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class DrydockLogListView extends AphrontView { 4 5 private $logs; 6 7 public function setLogs(array $logs) { 8 assert_instances_of($logs, 'DrydockLog'); 9 $this->logs = $logs; 10 return $this; 11 } 12 13 public function render() { 14 $logs = $this->logs; 15 $viewer = $this->getUser(); 16 17 $view = new PHUIObjectItemListView(); 18 19 $rows = array(); 20 foreach ($logs as $log) { 21 $resource_uri = '/drydock/resource/'.$log->getResourceID().'/'; 22 $lease_uri = '/drydock/lease/'.$log->getLeaseID().'/'; 23 24 $rows[] = array( 25 phutil_tag( 26 'a', 27 array( 28 'href' => $resource_uri, 29 ), 30 $log->getResourceID()), 31 phutil_tag( 32 'a', 33 array( 34 'href' => $lease_uri, 35 ), 36 $log->getLeaseID()), 37 $log->getMessage(), 38 phabricator_date($log->getEpoch(), $viewer), 39 ); 40 } 41 42 $table = new AphrontTableView($rows); 43 $table->setDeviceReadyTable(true); 44 $table->setHeaders( 45 array( 46 'Resource', 47 'Lease', 48 'Message', 49 'Date', 50 )); 51 $table->setShortHeaders( 52 array( 53 'R', 54 'L', 55 'Message', 56 '', 57 )); 58 $table->setColumnClasses( 59 array( 60 '', 61 '', 62 'wide', 63 '', 64 )); 65 66 return $table; 67 } 68 69 }
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 |