function ModuleHandler::getName
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Extension/ModuleHandler.php \Drupal\Core\Extension\ModuleHandler::getName()
- 8.9.x core/lib/Drupal/Core/Extension/ModuleHandler.php \Drupal\Core\Extension\ModuleHandler::getName()
- 11.x core/lib/Drupal/Core/Extension/ModuleHandler.php \Drupal\Core\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
-
core/
lib/ Drupal/ Core/ Extension/ ModuleHandler.php, line 726
Class
- ModuleHandler
- Class that manages modules in a Drupal installation.
Namespace
Drupal\Core\ExtensionCode
public function getName($module) {
@trigger_error(__METHOD__ . '() is deprecated in drupal:10.3.0 and is removed from drupal:12.0.0. Use \\Drupal\\Core\\Extension\\ModuleExtensionList::getName($module) instead. See https://www.drupal.org/node/3310017', E_USER_DEPRECATED);
return \Drupal::service('extension.list.module')->getName($module);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.