function MenuTreeStorage::collectRoutesAndDefinitions

Same name in other branches
  1. 9 core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::collectRoutesAndDefinitions()
  2. 8.9.x core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::collectRoutesAndDefinitions()
  3. 11.x core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::collectRoutesAndDefinitions()

Traverses the menu tree and collects all the route names and definitions.

Parameters

array $tree: The menu tree you wish to operate on.

array $definitions: An array to accumulate definitions by reference.

Return value

array Array of route names, with all values being unique.

1 call to MenuTreeStorage::collectRoutesAndDefinitions()
MenuTreeStorage::loadTreeData in core/lib/Drupal/Core/Menu/MenuTreeStorage.php

File

core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 965

Class

MenuTreeStorage
Provides a menu tree storage using the database.

Namespace

Drupal\Core\Menu

Code

protected function collectRoutesAndDefinitions(array $tree, array &$definitions) {
    return array_values($this->doCollectRoutesAndDefinitions($tree, $definitions));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.