You are here

protected function HttpServiceApiHandler::getModuleNames in HTTP Client Manager 8.2

Same name and namespace in other branches
  1. 8 src/HttpServiceApiHandler.php \Drupal\http_client_manager\HttpServiceApiHandler::getModuleNames()

Returns all module names.

Return value

string[] Returns the human readable names of all modules keyed by machine name.

File

src/HttpServiceApiHandler.php, line 295

Class

HttpServiceApiHandler
Class HttpServiceApiHandler.

Namespace

Drupal\http_client_manager

Code

protected function getModuleNames() {
  $modules = [];
  foreach (array_keys($this->moduleHandler
    ->getModuleList()) as $module) {
    $modules[$module] = $this->moduleHandler
      ->getName($module);
  }
  asort($modules);
  return $modules;
}