public function EntityListBuilder::load in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/EntityListBuilder.php \Drupal\Core\Entity\EntityListBuilder::load()
- 10 core/lib/Drupal/Core/Entity/EntityListBuilder.php \Drupal\Core\Entity\EntityListBuilder::load()
Loads entities of this type from storage for listing.
This allows the implementation to manipulate the listing, like filtering or sorting the loaded entities.
Return value
\Drupal\Core\Entity\EntityInterface[] An array of entities implementing \Drupal\Core\Entity\EntityInterface indexed by their IDs. Returns an empty array if no matching entities are found.
Overrides EntityListBuilderInterface::load
1 call to EntityListBuilder::load()
- EntityListBuilder::render in core/
lib/ Drupal/ Core/ Entity/ EntityListBuilder.php - Builds the entity listing as renderable array for table.html.twig.
4 methods override EntityListBuilder::load()
- ConfigEntityListBuilder::load in core/
lib/ Drupal/ Core/ Config/ Entity/ ConfigEntityListBuilder.php - Loads entities of this type from storage for listing.
- ModeratedNodeListBuilder::load in core/
modules/ content_moderation/ src/ ModeratedNodeListBuilder.php - Loads entities of this type from storage for listing.
- UserListBuilder::load in core/
modules/ user/ src/ UserListBuilder.php - Loads entities of this type from storage for listing.
- WorkspaceListBuilder::load in core/
modules/ workspaces/ src/ WorkspaceListBuilder.php - Loads entities of this type from storage for listing.
File
- core/
lib/ Drupal/ Core/ Entity/ EntityListBuilder.php, line 85
Class
- EntityListBuilder
- Defines a generic implementation to build a listing of entities.
Namespace
Drupal\Core\EntityCode
public function load() {
$entity_ids = $this
->getEntityIds();
return $this->storage
->loadMultiple($entity_ids);
}