LanguageListBuilder::load

public 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 73

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;
}
doc_Drupal
2016-10-29 09:22:34
Comments
Leave a Comment

Please login to continue.