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.

Overrides EntityListBuilder::load

File

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

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, array($this->entityType->getClass(), 'sort'));
  return $entities;
}
doc_Drupal
2016-10-29 08:52:44
Comments
Leave a Comment

Please login to continue.