function DrupalKernel::getExtensionFileNames

Gets the filenames for each enabled extension.

Parameters

array $extension_list: The list of extensions to return filenames for.

callable $get_data: The method to get data for the extension type.

Return value

array Array where each key is a theme name, and each value is a path to the respective *.info.yml file.

5 calls to DrupalKernel::getExtensionFileNames()
DrupalKernel::compileContainer in core/lib/Drupal/Core/DrupalKernel.php
Compiles a new service container.
DrupalKernel::discoverServiceProviders in core/lib/Drupal/Core/DrupalKernel.php
Discovers available serviceProviders.
DrupalKernel::getModuleFileNames in core/lib/Drupal/Core/DrupalKernel.php
Gets the filenames for each enabled module.
DrupalKernel::updateModules in core/lib/Drupal/Core/DrupalKernel.php
Implements Drupal\Core\DrupalKernelInterface::updateModules().
DrupalKernel::updateThemes in core/lib/Drupal/Core/DrupalKernel.php
Updates the kernel's list of themes to the new list.

File

core/lib/Drupal/Core/DrupalKernel.php, line 1676

Class

DrupalKernel
The DrupalKernel class is the core of Drupal itself.

Namespace

Drupal\Core

Code

protected function getExtensionFileNames(array $extension_list, callable $get_data) {
  $filenames = [];
  foreach ($extension_list as $extension => $weight) {
    if ($data = $get_data($extension)) {
      $filenames[$extension] = $data->getPathname();
    }
  }
  return $filenames;
}

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