public function PollListBuilder::load in Poll 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 ConfigEntityListBuilder::load
File
- src/
PollListBuilder.php, line 23
Class
- PollListBuilder
- Defines a class to build a listing of user role entities.
Namespace
Drupal\pollCode
public function load() {
$entities = $this->storage
->loadMultiple();
// 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;
}