You are here

public function UcWishlistListBuilder::load in UC Wish List 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/UcWishlistListBuilder.php, line 74

Class

UcWishlistListBuilder
Defining a class for building list of wishlist entities.

Namespace

Drupal\uc_wishlist

Code

public function load() {
  $entity_query = $this->queryFactory
    ->get('uc_wishlist');
  $entity_query
    ->pager(50);
  $header = $this
    ->buildHeader();
  $entity_query
    ->tableSort($header);
  $uids = $entity_query
    ->execute();
  return $this->storage
    ->loadMultiple($uids);
}