You are here

public function RevisionTreeIndex::getGraph in Multiversion 8.2

Same name and namespace in other branches
  1. 8 src/Entity/Index/RevisionTreeIndex.php \Drupal\multiversion\Entity\Index\RevisionTreeIndex::getGraph()

Parameters

string $uuid:

Return value

object of graph type

Overrides RevisionTreeIndexInterface::getGraph

File

src/Entity/Index/RevisionTreeIndex.php, line 82

Class

RevisionTreeIndex
The revision tree index.

Namespace

Drupal\multiversion\Entity\Index

Code

public function getGraph($uuid) {
  $tree = $this
    ->getTree($uuid);
  $graph = new Graph();
  $rev_ids = [];
  $this
    ->storeNodesId($tree, $rev_ids);
  $vertices = $this
    ->generateVertices($graph, $rev_ids);
  $this
    ->generateEdges($vertices, $tree);
  return $graph;
}