public function ConfigPagesStorage::loadMultiple in Config Pages 8.3
Same name and namespace in other branches
- 8.2 src/ConfigPagesStorage.php \Drupal\config_pages\ConfigPagesStorage::loadMultiple()
Loads one or more entities.
Parameters
$ids: An array of entity IDs, or NULL to load all entities.
Return value
\Drupal\Core\Entity\EntityInterface[] An array of entity objects indexed by their IDs. Returns an empty array if no matching entities are found.
Overrides EntityStorageBase::loadMultiple
File
- src/
ConfigPagesStorage.php, line 37
Class
- ConfigPagesStorage
- Defines the storage handler class for ConfigPages.
Namespace
Drupal\config_pagesCode
public function loadMultiple(array $ids = NULL) {
$entities = [];
// Use module load method to get ConfigPage loaded by id.
foreach ($ids as $id) {
$entity = $this
->load($id);
if (!empty($entity)) {
$entities[$entity
->id()] = $entity;
}
}
return !empty($entities) ? $entities : NULL;
}