You are here

public function ModuleHandler::getName in Service Container 7

Same name and namespace in other branches
  1. 7.2 src/Extension/ModuleHandler.php \Drupal\service_container\Extension\ModuleHandler::getName()

Gets the human readable name of a given module.

Parameters

string $module: The machine name of the module which title should be shown.

Return value

string Returns the human readable name of the module or the machine name passed in if no matching module is found.

Overrides ModuleHandlerInterface::getName

File

src/Extension/ModuleHandler.php, line 232
Contains Drupal\service_container\Extension\ModuleHandler.

Class

ModuleHandler
Class that manages modules in a Drupal installation.

Namespace

Drupal\service_container\Extension

Code

public function getName($module) {
  $module_data = $this->drupal7
    ->system_rebuild_module_data();
  return $module_data[$module]->info['name'];
}