You are here

protected function ExtensionList::recalculatePathnames in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::recalculatePathnames()
  2. 9 core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::recalculatePathnames()

Generates a sorted list of .info.yml file locations for all extensions.

Return value

string[] An array of .info.yml file locations keyed by the extension machine name.

File

core/lib/Drupal/Core/Extension/ExtensionList.php, line 439

Class

ExtensionList
Provides available extensions.

Namespace

Drupal\Core\Extension

Code

protected function recalculatePathnames() {
  $extensions = $this
    ->getList();
  ksort($extensions);
  return array_map(function (Extension $extension) {
    return $extension
      ->getPathname();
  }, $extensions);
}