function ExtensionList::getAllAvailableInfo

Same name in other branches
  1. 9 core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::getAllAvailableInfo()
  2. 8.9.x core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::getAllAvailableInfo()
  3. 11.x core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::getAllAvailableInfo()

Returns an array of info files information of available extensions.

This function returns the processed contents (with added defaults) of the .info.yml files.

Return value

array[] An associative array of extension information arrays, keyed by extension name.

1 call to ExtensionList::getAllAvailableInfo()
ExtensionList::getAllInstalledInfo in core/lib/Drupal/Core/Extension/ExtensionList.php
Returns an array of info files information of installed extensions.
1 method overrides ExtensionList::getAllAvailableInfo()
DatabaseDriverList::getAllAvailableInfo in core/lib/Drupal/Core/Extension/DatabaseDriverList.php

File

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

Class

ExtensionList
Provides available extensions.

Namespace

Drupal\Core\Extension

Code

public function getAllAvailableInfo() {
    if ($this->extensionInfo === NULL) {
        $cache_id = $this->getInfoCacheId();
        if ($cache = $this->cache
            ->get($cache_id)) {
            $info = $cache->data;
        }
        else {
            $info = $this->recalculateInfo();
            $this->cache
                ->set($cache_id, $info);
        }
        $this->extensionInfo = $info;
    }
    return $this->extensionInfo;
}

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