You are here

public function ExtensionList::getList in Drupal 8

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