You are here

public function LingotekProfileListBuilder::load in Lingotek Translation 3.6.x

Same name and namespace in other branches
  1. 8 src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::load()
  2. 8.2 src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::load()
  3. 4.0.x src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::load()
  4. 3.0.x src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::load()
  5. 3.1.x src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::load()
  6. 3.2.x src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::load()
  7. 3.3.x src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::load()
  8. 3.4.x src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::load()
  9. 3.5.x src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::load()
  10. 3.7.x src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::load()
  11. 3.8.x src/LingotekProfileListBuilder.php \Drupal\lingotek\LingotekProfileListBuilder::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 ConfigEntityListBuilder::load

File

src/LingotekProfileListBuilder.php, line 73

Class

LingotekProfileListBuilder
Defines a class to build a listing of Lingotek profile entities.

Namespace

Drupal\lingotek

Code

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, [
    $this->entityType
      ->getClass(),
    'sort',
  ]);
  return $entities;
}