public UserListBuilder::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/modules/user/src/UserListBuilder.php, line 80
Class
- UserListBuilder
- Defines a class to build a listing of user entities.
Namespace
Drupal\user
Code
public function load() { $entity_query = $this->queryFactory->get('user'); $entity_query->condition('uid', 0, '<>'); $entity_query->pager(50); $header = $this->buildHeader(); $entity_query->tableSort($header); $uids = $entity_query->execute(); return $this->storage->loadMultiple($uids); }
Please login to continue.