function LocaleProjectRepository::getMultiple
Same name and namespace in other branches
- 11.x core/modules/locale/src/LocaleProjectRepository.php \Drupal\locale\LocaleProjectRepository::getMultiple()
Returns the stored value for a given key.
Parameters
array $keys: The key of the data to retrieve.
Return value
array An array of the projects
File
-
core/
modules/ locale/ src/ LocaleProjectRepository.php, line 41
Class
- LocaleProjectRepository
- Provides storage and rebuilding of locale project information.
Namespace
Drupal\localeCode
public function getMultiple(array $keys) : array {
$projects = $this->getAll();
// Match entity storage getMultiple.
if (empty($keys)) {
return [];
}
// Return the requested project names.
return array_intersect_key($projects, array_combine($keys, $keys));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.