function ExtensionList::getList

Same name in other branches
  1. 9 core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::getList()
  2. 8.9.x 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.

6 calls to ExtensionList::getList()
DatabaseDriverList::getFromDriverName in core/lib/Drupal/Core/Extension/DatabaseDriverList.php
Returns the first available driver extension by the driver name.
DatabaseDriverList::getInstallableList in core/lib/Drupal/Core/Extension/DatabaseDriverList.php
Returns the list of installable database drivers.
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.

... See full list

File

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

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.