Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/Config/Entity/ConfigEntityListBuilder.php \Drupal\Core\Config\Entity\ConfigEntityListBuilder::load()
  2. 9 core/lib/Drupal/Core/Config/Entity/ConfigEntityListBuilder.php \Drupal\Core\Config\Entity\ConfigEntityListBuilder::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 EntityListBuilder::load

3 calls to ConfigEntityListBuilder::load()
BlockListBuilder::buildBlocksForm in core/modules/block/src/BlockListBuilder.php
Builds the main "Blocks" portion of the form.
EntityDisplayModeListBuilder::load in core/modules/field_ui/src/EntityDisplayModeListBuilder.php
Loads entities of this type from storage for listing.
ViewListBuilder::load in core/modules/views_ui/src/ViewListBuilder.php
Loads entities of this type from storage for listing.
3 methods override ConfigEntityListBuilder::load()
ConfigTranslationFieldListBuilder::load in core/modules/config_translation/src/Controller/ConfigTranslationFieldListBuilder.php
Loads entities of this type from storage for listing.
EntityDisplayModeListBuilder::load in core/modules/field_ui/src/EntityDisplayModeListBuilder.php
Loads entities of this type from storage for listing.
ViewListBuilder::load in core/modules/views_ui/src/ViewListBuilder.php
Loads entities of this type from storage for listing.

File

core/lib/Drupal/Core/Config/Entity/ConfigEntityListBuilder.php, line 25

Class

ConfigEntityListBuilder
Defines the default class to build a listing of configuration entities.

Namespace

Drupal\Core\Config\Entity

Code

public function load() {
  $entity_ids = $this
    ->getEntityIds();
  $entities = $this->storage
    ->loadMultipleOverrideFree($entity_ids);

  // Sort the entities using the entity class's sort() method.
  // See \Drupal\Core\Config\Entity\ConfigEntityBase::sort().
  uasort($entities, [
    $this->entityType
      ->getClass(),
    'sort',
  ]);
  return $entities;
}