function ConfigImportSubscriber::getNames

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php \Drupal\Core\EventSubscriber\ConfigImportSubscriber::getNames()
  2. 10 core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php \Drupal\Core\EventSubscriber\ConfigImportSubscriber::getNames()
  3. 11.x core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php \Drupal\Core\EventSubscriber\ConfigImportSubscriber::getNames()

Gets human readable extension names.

Parameters

array $names: A list of extension machine names.

\Drupal\Core\Extension\Extension[] $extension_data: Extension data.

Return value

array A list of human-readable extension names, or machine names if human-readable names are not available.

1 call to ConfigImportSubscriber::getNames()
ConfigImportSubscriber::validateDependencies in core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php
Validates configuration being imported does not have unmet dependencies.

File

core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php, line 373

Class

ConfigImportSubscriber
Config import subscriber for config import events.

Namespace

Drupal\Core\EventSubscriber

Code

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);
}

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