function ExtensionList::getName

Same name 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()
  3. 11.x 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'];
}

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