You are here

protected function RequiredModuleUninstallValidator::getModuleInfoByModule in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Extension/RequiredModuleUninstallValidator.php \Drupal\Core\Extension\RequiredModuleUninstallValidator::getModuleInfoByModule()

Returns the module info for a specific module.

Parameters

string $module: The name of the module.

Return value

array The module info, or NULL if that module does not exist.

1 call to RequiredModuleUninstallValidator::getModuleInfoByModule()
RequiredModuleUninstallValidator::validate in core/lib/Drupal/Core/Extension/RequiredModuleUninstallValidator.php
Determines the reasons a module can not be uninstalled.

File

core/lib/Drupal/Core/Extension/RequiredModuleUninstallValidator.php, line 51
Contains \Drupal\Core\Extension\RequiredModuleUninstallValidator.

Class

RequiredModuleUninstallValidator
Ensures that required modules cannot be uninstalled.

Namespace

Drupal\Core\Extension

Code

protected function getModuleInfoByModule($module) {
  $modules = system_rebuild_module_data();
  return isset($modules[$module]->info) ? $modules[$module]->info : [];
}