You are here

public function LanguageListBuilder::load in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/language/src/LanguageListBuilder.php \Drupal\language\LanguageListBuilder::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 ConfigEntityListBuilder::load

File

core/modules/language/src/LanguageListBuilder.php, line 79
Contains \Drupal\language\LanguageListBuilder.

Class

LanguageListBuilder
Defines a class to build a listing of language entities.

Namespace

Drupal\language

Code

public function load() {
  $entities = $this->storage
    ->loadByProperties(array(
    'locked' => FALSE,
  ));

  // 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;
}