You are here

protected function ExtensionList::recalculatePathnames in Drupal 8

Same name and namespace in other branches
  1. 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.

1 call to ExtensionList::recalculatePathnames()
ExtensionList::getPathnames in core/lib/Drupal/Core/Extension/ExtensionList.php
Returns a list of extension file paths keyed by 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);
}