You are here

public function LinkIndex::build in Drupal 7 to 8/9 Module Upgrader 8

Builds all the links in this index and returns them as an array of arrays, keyed by link ID.

Return value

array

File

src/Routing/LinkIndex.php, line 45

Class

LinkIndex
Represents a set of link bindings of a single type (i.e., menu links, local tasks, etc.)

Namespace

Drupal\drupalmoduleupgrader\Routing

Code

public function build() {
  $build = [];
  foreach ($this as $binding) {
    $build[$binding
      ->getIdentifier()] = $binding
      ->build();
  }
  return $build;
}