function DrupalKernel::getModulesParameter

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

Returns an array of Extension class parameters for all enabled modules.

Return value

array

1 call to DrupalKernel::getModulesParameter()
DrupalKernel::compileContainer in core/lib/Drupal/Core/DrupalKernel.php
Compiles a new service container.

File

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

Class

DrupalKernel
The DrupalKernel class is the core of Drupal itself.

Namespace

Drupal\Core

Code

protected function getModulesParameter() {
    $extensions = [];
    foreach ($this->moduleList as $name => $weight) {
        if ($data = $this->moduleData($name)) {
            $extensions[$name] = [
                'type' => $data->getType(),
                'pathname' => $data->getPathname(),
                'filename' => $data->getExtensionFilename(),
            ];
        }
    }
    return $extensions;
}

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