function ExtensionList::getList

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

Returns all available extensions.

Return value

\Drupal\Core\Extension\Extension[] Processed extension objects, keyed by machine name.

4 calls to ExtensionList::getList()
ExtensionList::exists in core/lib/Drupal/Core/Extension/ExtensionList.php
Determines if an extension exists in the filesystem.
ExtensionList::get in core/lib/Drupal/Core/Extension/ExtensionList.php
Returns a single extension.
ExtensionList::recalculateInfo in core/lib/Drupal/Core/Extension/ExtensionList.php
Generates the information from .info.yml files for extensions of this type.
ExtensionList::recalculatePathnames in core/lib/Drupal/Core/Extension/ExtensionList.php
Generates a sorted list of .info.yml file locations for all extensions.

File

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

Class

ExtensionList
Provides available extensions.

Namespace

Drupal\Core\Extension

Code

public function getList() {
    if ($this->extensions !== NULL) {
        return $this->extensions;
    }
    if ($cache = $this->cache
        ->get($this->getListCacheId())) {
        $this->extensions = $cache->data;
        return $this->extensions;
    }
    $extensions = $this->doList();
    $this->cache
        ->set($this->getListCacheId(), $extensions);
    $this->extensions = $extensions;
    return $this->extensions;
}

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