protected ConfigImportSubscriber::getNames(array $names, array $extension_data)
Gets human readable extension names.
array $names: A list of extension machine names.
\Drupal\Core\Extension\Extension[] $extension_data: Extension data.
array A list of human-readable extension names, or machine names if human-readable names are not available.
protected function getNames(array $names, array $extension_data) { return array_map(function($name) use ($extension_data) { if (isset($extension_data[$name])) { $name = $extension_data[$name]->info['name']; } return $name; }, $names); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!EventSubscriber!ConfigImportSubscriber.php/function/ConfigImportSubscriber::getNames/8.1.x