public function EntityDisplayModeListBuilder::load in Drupal 10
Same name and namespace in other branches
- 8 core/modules/field_ui/src/EntityDisplayModeListBuilder.php \Drupal\field_ui\EntityDisplayModeListBuilder::load()
- 9 core/modules/field_ui/src/EntityDisplayModeListBuilder.php \Drupal\field_ui\EntityDisplayModeListBuilder::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 ConfigEntityListBuilder::load
1 call to EntityDisplayModeListBuilder::load()
- EntityDisplayModeListBuilder::render in core/
modules/ field_ui/ src/ EntityDisplayModeListBuilder.php - Builds the entity listing as renderable array for table.html.twig.
File
- core/
modules/ field_ui/ src/ EntityDisplayModeListBuilder.php, line 75
Class
- EntityDisplayModeListBuilder
- Defines a class to build a listing of view mode entities.
Namespace
Drupal\field_uiCode
public function load() {
$entities = [];
foreach (parent::load() as $entity) {
$entities[$entity
->getTargetType()][] = $entity;
}
return $entities;
}