function DrupalKernel::getModuleNamespacesPsr4

Gets the PSR-4 base directories for module namespaces.

Parameters

string[] $module_file_names: Array where each key is a module name, and each value is a path to the respective *.info.yml file.

Return value

string[] Array where each key is a module namespace like 'Drupal\system', and each value is the PSR-4 base directory associated with the module namespace.

Deprecated

in drupal:11.3.0 and is removed from drupal:12.0.0. Use getExtensionNamespacesPsr4() instead.

See also

https://www.drupal.org/node/3551652

File

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

Class

DrupalKernel
The DrupalKernel class is the core of Drupal itself.

Namespace

Drupal\Core

Code

protected function getModuleNamespacesPsr4($module_file_names) {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.3.0 and is removed from drupal:12.0.0. Use getExtensionNamespacesPsr4() instead. See https://www.drupal.org/node/3551652', E_USER_DEPRECATED);
  return $this->getExtensionNamespacesPsr4($module_file_names);
}

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