function ExtensionList::recalculatePathNames

Same name in other branches
  1. 9 core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::recalculatePathnames()
  2. 8.9.x core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::recalculatePathnames()
  3. 11.x 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.
1 method overrides ExtensionList::recalculatePathNames()
DatabaseDriverList::recalculatePathNames in core/lib/Drupal/Core/Extension/DatabaseDriverList.php
Generates a sorted list of .info.yml file locations for all extensions.

File

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

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);
}

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