function LocaleConfigManager::getStringNames

Same name in other branches
  1. 8.9.x core/modules/locale/src/LocaleConfigManager.php \Drupal\locale\LocaleConfigManager::getStringNames()
  2. 10 core/modules/locale/src/LocaleConfigManager.php \Drupal\locale\LocaleConfigManager::getStringNames()
  3. 11.x core/modules/locale/src/LocaleConfigManager.php \Drupal\locale\LocaleConfigManager::getStringNames()

Gets configuration names associated with strings.

Parameters

array $lids: Array with string identifiers.

Return value

array Array of configuration object names.

File

core/modules/locale/src/LocaleConfigManager.php, line 322

Class

LocaleConfigManager
Manages configuration supported in part by interface translation.

Namespace

Drupal\locale

Code

public function getStringNames(array $lids) {
    $names = [];
    $locations = $this->localeStorage
        ->getLocations([
        'sid' => $lids,
        'type' => 'configuration',
    ]);
    foreach ($locations as $location) {
        $names[$location->name] = $location->name;
    }
    return $names;
}

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