Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/graph/PhabricatorObjectGraph.php
Show First 20 Lines • Show All 183 Lines • ▼ Show 20 Lines | final public function newGraphTable() { | ||||
$objects = $this->newQuery() | $objects = $this->newQuery() | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->withPHIDs(array_keys($ancestry)) | ->withPHIDs(array_keys($ancestry)) | ||||
->execute(); | ->execute(); | ||||
$objects = mpull($objects, null, 'getPHID'); | $objects = mpull($objects, null, 'getPHID'); | ||||
$order = id(new PhutilDirectedScalarGraph()) | $order = id(new PhutilDirectedScalarGraph()) | ||||
->addNodes($ancestry) | ->addNodes($ancestry) | ||||
->getTopographicallySortedNodes(); | ->getNodesInTopologicalOrder(); | ||||
$ancestry = array_select_keys($ancestry, $order); | $ancestry = array_select_keys($ancestry, $order); | ||||
$traces = id(new PHUIDiffGraphView()) | $traces = id(new PHUIDiffGraphView()) | ||||
->renderGraph($ancestry); | ->renderGraph($ancestry); | ||||
$ii = 0; | $ii = 0; | ||||
$rows = array(); | $rows = array(); | ||||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |