You are here

public function ExtensionList::getName in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::getName()
  2. 10 core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::getName()

Returns the human-readable name of the extension.

Parameters

string $extension_name: The machine name of the extension.

Return value

string The human-readable name of the extension.

Throws

\Drupal\Core\Extension\Exception\UnknownExtensionException If there is no extension with the supplied machine name.

File

core/lib/Drupal/Core/Extension/ExtensionList.php, line 242

Class

ExtensionList
Provides available extensions.

Namespace

Drupal\Core\Extension

Code

public function getName($extension_name) {
  return $this
    ->get($extension_name)->info['name'];
}