You are here

public function EntitySubqueueListBuilder::load in Entityqueue 8

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

File

src/EntitySubqueueListBuilder.php, line 55

Class

EntitySubqueueListBuilder
Defines a class that builds a listing of entity subqueues.

Namespace

Drupal\entityqueue

Code

public function load() {
  $entities = parent::load();
  foreach ($entities as $key => $entity) {
    $entities[$key] = $this->entityRepository
      ->getTranslationFromContext($entity);
  }
  return $entities;
}