// Include all dependencies in the graph so that topographical sorting
// works.
foreach (array_merge($entity->
getDependencies('config'
),
$entity->
getDependencies('module'
),
$entity->
getDependencies('theme'
)) as $dependency) { $graph[$dependency]['edges'
][$graph_key] = TRUE;
$graph[$dependency]['name'
] =
$dependency;
} } // Ensure that order of the graph is consistent.
krsort($graph);
$graph_object =
new Graph($graph);
$this->graph =
$graph_object->
searchAndSort();
} return $this->graph;
} /**
* Sets data to calculate dependencies for.
*
* The data is converted into lightweight ConfigEntityDependency objects.
*
* @param array $data
* Configuration data keyed by configuration object name. Typically the
* output of \Drupal\Core\Config\StorageInterface::loadMultiple().
*
* @return $this
*/