Path: blob/master/src/infrastructure/graph/DifferentialRevisionGraph.php
12241 views
<?php12final class DifferentialRevisionGraph3extends PhabricatorObjectGraph {45protected function getEdgeTypes() {6return array(7DifferentialRevisionDependsOnRevisionEdgeType::EDGECONST,8DifferentialRevisionDependedOnByRevisionEdgeType::EDGECONST,9);10}1112protected function getParentEdgeType() {13return DifferentialRevisionDependsOnRevisionEdgeType::EDGECONST;14}1516protected function newQuery() {17return new DifferentialRevisionQuery();18}1920protected function isClosed($object) {21return $object->isClosed();22}2324protected function newTableRow($phid, $object, $trace) {25$viewer = $this->getViewer();2627if ($object) {28$status_icon = $object->getStatusIcon();29$status_color = $object->getStatusIconColor();30$status_name = $object->getStatusDisplayName();3132$status = array(33id(new PHUIIconView())34->setIcon($status_icon, $status_color),35' ',36$status_name,37);3839$author = $viewer->renderHandle($object->getAuthorPHID());40$link = phutil_tag(41'a',42array(43'href' => $object->getURI(),44),45$object->getTitle());4647$link = array(48$object->getMonogram(),49' ',50$link,51);52} else {53$status = null;54$author = null;55$link = $viewer->renderHandle($phid);56}5758$link = AphrontTableView::renderSingleDisplayLine($link);5960return array(61$trace,62$status,63$author,64$link,65);66}6768protected function newTable(AphrontTableView $table) {69return $table70->setHeaders(71array(72null,73pht('Status'),74pht('Author'),75pht('Revision'),76))77->setColumnClasses(78array(79'threads',80'graph-status',81null,82'wide pri object-link',83));84}8586}878889