You are here

public function ConfigDependencyManager::sortAll in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php \Drupal\Core\Config\Entity\ConfigDependencyManager::sortAll()

Sorts the dependencies in order of most dependent last.

Return value

array The list of entities in order of most dependent last, otherwise alphabetical.

File

core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php, line 191
Contains \Drupal\Core\Config\Entity\ConfigDependencyManager.

Class

ConfigDependencyManager
Provides a class to discover configuration entity dependencies.

Namespace

Drupal\Core\Config\Entity

Code

public function sortAll() {
  $graph = $this
    ->getGraph();

  // Sort by reverse weight and alphabetically. The most dependent entities
  // are last and entities with the same weight are alphabetically ordered.
  uasort($graph, array(
    $this,
    'sortGraph',
  ));
  return array_keys($graph);
}