You are here

public function ScheduledTransitionsListBuilder::load in Scheduled Transitions 2.x

Same name and namespace in other branches
  1. 8 src/ScheduledTransitionsListBuilder.php \Drupal\scheduled_transitions\ScheduledTransitionsListBuilder::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

File

src/ScheduledTransitionsListBuilder.php, line 57

Class

ScheduledTransitionsListBuilder
Scheduled transition list builder.

Namespace

Drupal\scheduled_transitions

Code

public function load() {
  $query = $this->storage
    ->getQuery();
  $header = $this
    ->buildHeader();
  $query
    ->tableSort($header);
  $ids = $query
    ->execute();
  return $this->storage
    ->loadMultiple($ids);
}