public function KeyRepository::getKeys in Key 8
Get Key entities.
Parameters
array $key_ids: (optional) An array of entity IDs, or NULL to load all entities.
Return value
\Drupal\key\Entity\Key[] An array of key entities, indexed by ID. Returns an empty array if no matching entities are found.
Overrides KeyRepositoryInterface::getKeys
1 call to KeyRepository::getKeys()
- KeyRepository::getKeyNamesAsOptions in src/
KeyRepository.php - Get an array of key names, useful as options in form fields.
File
- src/
KeyRepository.php, line 63
Class
- KeyRepository
- Provides a repository for Key configuration entities.
Namespace
Drupal\keyCode
public function getKeys(array $key_ids = NULL) {
return $this->entityTypeManager
->getStorage('key')
->loadMultiple($key_ids);
}