You are here

protected function RevisionTreeIndex::generateVertices in Multiversion 8

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

Generates vertices for Graph.

Parameters

Graph $graph: A graph object.

array $revision_ids: The revision ids to generate vertices for.

Return value

array An array of vertices.

1 call to RevisionTreeIndex::generateVertices()
RevisionTreeIndex::getGraph in src/Entity/Index/RevisionTreeIndex.php

File

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

Class

RevisionTreeIndex
The revision tree index.

Namespace

Drupal\multiversion\Entity\Index

Code

protected function generateVertices(Graph $graph, array $revision_ids) {
  foreach ($revision_ids as $id) {
    $ids[] = $id;
  }
  return $graph
    ->createVertices($ids)
    ->getMap();
}